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'
This commit is contained in:
Gregory Anders
2022-05-22 21:20:18 -06:00
committed by GitHub
parent a7e0a02031
commit 9e1ee9fb1d
29 changed files with 62 additions and 270 deletions

View File

@@ -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;