diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-11-30 22:13:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-30 22:13:50 -0500 |
commit | 828bf128a64466f254629b102e283af35666cd05 (patch) | |
tree | 6cda5c2df8d799d87d86dcfabc595e2737b8feda /src/nvim/normal.c | |
parent | 2635b77dba6fa218871441fa3380860405bf9240 (diff) | |
parent | 980c68d0362c3ca099c0facef2d08efede76aabf (diff) | |
download | rneovim-828bf128a64466f254629b102e283af35666cd05.tar.gz rneovim-828bf128a64466f254629b102e283af35666cd05.tar.bz2 rneovim-828bf128a64466f254629b102e283af35666cd05.zip |
Merge pull request #15840 from vimpostor/vim-8.2.3430
vim-patch:8.2.{3430,3434,3462,3463,3555,3609,3610}: ModeChanged autocmd
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 03312e5df4..f2b272a13f 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -487,6 +487,7 @@ static void normal_prepare(NormalState *s) if (finish_op != c) { ui_cursor_shape(); // may show different cursor shape } + trigger_modechanged(); // When not finishing an operator and no register name typed, reset the count. if (!finish_op && !s->oa.regname) { @@ -928,6 +929,7 @@ normal_end: // Reset finish_op, in case it was set s->c = finish_op; finish_op = false; + trigger_modechanged(); // Redraw the cursor with another shape, if we were in Operator-pending // mode or did a replace command. if (s->c || s->ca.cmdchar == 'r') { @@ -965,6 +967,7 @@ normal_end: && s->oa.regname == 0) { if (restart_VIsual_select == 1) { VIsual_select = true; + trigger_modechanged(); showmode(); restart_VIsual_select = 0; } @@ -3066,6 +3069,7 @@ void end_visual_mode(void) may_clear_cmdline(); adjust_cursor_eol(); + trigger_modechanged(); } /* @@ -4851,6 +4855,7 @@ static void nv_ctrlg(cmdarg_T *cap) { if (VIsual_active) { // toggle Selection/Visual mode VIsual_select = !VIsual_select; + trigger_modechanged(); showmode(); } else if (!checkclearop(cap->oap)) { // print full name if count given or :cd used @@ -4894,6 +4899,7 @@ static void nv_ctrlo(cmdarg_T *cap) { if (VIsual_active && VIsual_select) { VIsual_select = false; + trigger_modechanged(); showmode(); restart_VIsual_select = 2; // restart Select mode later } else { @@ -6680,6 +6686,7 @@ static void nv_visual(cmdarg_T *cap) // or char/line mode VIsual_mode = cap->cmdchar; showmode(); + trigger_modechanged(); } redraw_curbuf_later(INVERTED); // update the inversion } else { // start Visual mode @@ -6793,6 +6800,7 @@ static void n_start_visual_mode(int c) foldAdjustVisual(); + trigger_modechanged(); setmouse(); // Check for redraw after changing the state. conceal_check_cursor_line(); |