aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.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/option.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/option.c')
-rw-r--r--src/nvim/option.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 7dd7b41328..0d02bae5f7 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -4052,21 +4052,6 @@ static char *set_bool_option(const int opt_idx, char_u *const varp, const int va
} else if ((int *)varp == &p_paste) {
// when 'paste' is set or reset also change other options
paste_option_changed();
- } else if ((int *)varp == &p_im) {
- // when 'insertmode' is set from an autocommand need to do work here
- if (p_im) {
- if ((State & MODE_INSERT) == 0) {
- need_start_insertmode = true;
- }
- stop_insert_mode = false;
- } else if (old_value) { // only reset if it was set previously
- need_start_insertmode = false;
- stop_insert_mode = true;
- if (restart_edit != 0 && mode_displayed) {
- clear_cmdline = true; // remove "(insert)"
- }
- restart_edit = 0;
- }
} else if ((int *)varp == &p_ic && p_hls) {
// when 'ignorecase' is set or reset and 'hlsearch' is set, redraw
redraw_all_later(SOME_VALID);