Escape with multiple cursor selections broken
bennypowers opened this issue · comments
Benny Powers - עם ישראל חי! commented
#1150 broke a common workflow of mine:
Source
Given this source text:
<a aria-label="GitLab" target="_blank" rel="noreferrer nofollow" tabindex="-1" href="https://gitlab.com/bennyp">
<sl-icon-button icon="gitlab-icon-mono">
<svg><use xlink:href="#gitlab-icon-mono"/></svg>
</sl-icon-button>
</a>
<a aria-label="GitHub" target="_blank" rel="noreferrer nofollow" tabindex="-1" href="https://github.com/bennypowers">
<sl-icon-button>
<svg><use xlink:href="#github-icon-mono"/></svg>
</sl-icon-button>
</a>
Steps to Reproduce
Perform these steps:
- move to
s
in first occurrence of<sl-icon-button>
v
(enter VISUAL mode)e e e
(sl-icon
is selected)cmd-d cmd-d cmd-d cmd-d
(four instances ofsl-icon
are highlighted via multiple cursors)escape
to NORMAL mode (multiple cursors are on then
insl-icon
) BROKEN- perform an operation e.g.
d i w backspace
to change all instances from<sl-icon-button>
to<sl-button>
Expected
Multiple cursors on first n
in four instances of <sl-icon-button>
Actual
This commit broke step 5 - instead of cursor staying on the n
in each instance, multiple cursors collapse to only the original instance.
Workaround
add the following to the bottom of keymap.cson
:
'atom-text-editor.vim-mode-plus':
'escape': 'vim-mode-plus:reset-normal-mode'
'atom-text-editor.vim-mode-plus:not(.normal-mode)':
'escape': 'vim-mode-plus:activate-normal-mode'
debug info
{
"atom": "1.57.0",
"platform": "darwin",
"release": "18.7.0",
"vmpVersion": "1.36.5",
"vmpConfig": {
"askOptInToEditorScrollPastEnd": false,
"automaticallyEscapeInsertModeOnActivePaneItemChange": true,
"charactersToAddSpaceOnSurround": [
"{"
],
"hideCommandsFromCommandPalette": true,
"keymapBackslashToInnerCommentOrParagraphWhenToggleLineCommentsIsPending": true,
"keymapCCToChangeInnerSmartWord": true,
"keymapPToPutWithAutoIndent": true,
"keymapSemicolonToConfirmOnFindInput": true,
"keymapSemicolonToInnerAnyPairInOperatorPendingMode": true,
"showHoverSearchCounter": true,
"smoothScrollOnFullScrollMotion": true,
"statusBarModeStringStyle": "long",
"useSmartcaseForSearch": true,
"useSmartcaseForSearchCurrentWord": true,
"wrapLeftRightMotion": true
}
}
Read and check all "Checklist" below.
Checklist
You have to check all before open issue.
- Provide your environment info clipped by
Vim Mode Plus: Clip Debug Info
command. - Try with latest Atom and latest vim-mode-plus.
- Pick a descriptive and non-ambiguous subject
- Express "what" you want(feature? config option?, behavior change?) in short sentence(not long!).
- Contrast current behavior if you want to change current behavior, with sample text, operation(keystroke) and result.
- Include real use case so that maintainer can understand "why" you need help.
- Include Atom(
atom --version
), vim-mode-plus version, and OS version(e.g. macOS Sierra 10.12.3). - If keybinding issue, Read this.
t9md commented
Thank you for reporting. I reverted and released 1.36.6.