aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2022-05-22 21:20:18 -0600
committerGitHub <noreply@github.com>2022-05-22 21:20:18 -0600
commit9e1ee9fb1d747facb6fa97a32dc5e22c7dfcb346 (patch)
treeb6fe628698f9d4181285a144b17b7518833693ce /src/nvim/ex_cmds.c
parenta7e0a02031c7b4a192cb9c0e4eb13a714d5b0dbb (diff)
downloadrneovim-9e1ee9fb1d747facb6fa97a32dc5e22c7dfcb346.tar.gz
rneovim-9e1ee9fb1d747facb6fa97a32dc5e22c7dfcb346.tar.bz2
rneovim-9e1ee9fb1d747facb6fa97a32dc5e22c7dfcb346.zip
refactor!: delete insertmode (#18547)
Neovim already removed `evim` (or any similar flags). The 'insertmode' option is a weird remnant, so get rid of it. The 'insertmode' option is replaced with a script that closely emulates the option. This script is documented at :help 'insertmode'
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index ce3afba19b..f5fa424514 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -2880,10 +2880,6 @@ int do_ecmd(int fnum, char *ffname, char *sfname, exarg_T *eap, linenr_T newlnum
redraw_curbuf_later(NOT_VALID); // redraw this buffer later
}
- if (p_im && (State & MODE_INSERT) == 0) {
- need_start_insertmode = true;
- }
-
// Change directories when the 'acd' option is set.
do_autochdir();
@@ -4909,9 +4905,8 @@ void ex_help(exarg_T *eap)
}
}
- if (!p_im) {
- restart_edit = 0; // don't want insert mode in help file
- }
+ restart_edit = 0; // don't want insert mode in help file
+
// Restore KeyTyped, setting 'filetype=help' may reset it.
// It is needed for do_tag top open folds under the cursor.
KeyTyped = old_KeyTyped;