You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When you invoke a command that turns the mode to "Insert" after you invoke <C-o> in Insert mode (CommandOneNormalCommandInInsertMode), <Esc>/<C-o> won't turn the mode to "Normal".
To Reproduce
Steps to reproduce the behavior:
Go to Insert mode
Type <C-o>
Type o, A, I, or any command that turns the mode to "Insert"
Type some words
Type <Esc> or <C-o>
You are still in the Insert mode
Expected behavior
You go back to the Normal mode
Environment (please complete the following information):
When you type "o" after <C-o>, ranAction will be false because vimState.currentMode is ModeName.Insert and vimState.returnToInsertAfterCommand won't turn to false (Step 2 and 3). Then when you type <Esc> (Step 5),
CommandEscInsertMode.exec turns the mode to "Normal" (inside ModeHandler.runAction)
ModeHandler.runAction turns the mode back to "Insert" immediately.
The text was updated successfully, but these errors were encountered:
turara
changed the title
CommandOneNormalCommandInInsertMode won't work properly
Insert mode's <C-o> doesn't work properly
Nov 5, 2019
Describe the bug
When you invoke a command that turns the mode to "Insert" after you invoke <C-o> in Insert mode (CommandOneNormalCommandInInsertMode), <Esc>/<C-o> won't turn the mode to "Normal".
To Reproduce
Steps to reproduce the behavior:
Expected behavior
You go back to the Normal mode
Environment (please complete the following information):
Additional context
Related to #3074
Cause of the problem
I believe the following line is part of the cause although I couldn't figure out how to fix it.
Vim/src/mode/modeHandler.ts
Line 546 in 2f4c187
When you type "o" after <C-o>,
ranAction
will be false becausevimState.currentMode
isModeName.Insert
andvimState.returnToInsertAfterCommand
won't turn to false (Step 2 and 3). Then when you type <Esc> (Step 5),The text was updated successfully, but these errors were encountered: