diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2024-03-15 00:39:44 +0100 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2024-03-15 09:15:56 +0100 |
commit | d41b8d47587bd4c300420fa76f517298e97af513 (patch) | |
tree | cae0a4702badcb3e52a200d6bfd301fc19eab3c1 /src/nvim/ex_getln.c | |
parent | c971f538ab87b537ae4c97bd44167661c5691a2d (diff) | |
download | rneovim-d41b8d47587bd4c300420fa76f517298e97af513.tar.gz rneovim-d41b8d47587bd4c300420fa76f517298e97af513.tar.bz2 rneovim-d41b8d47587bd4c300420fa76f517298e97af513.zip |
fix(ui): ext_cmdline should not move cursor to curwin
Problem: The ext_cmdline cursor position on the screen seems to rely on
an implicit assumption that the event listener implements a
cmdline window that is made the current window which is
problematic (e.g. breaks 'incsearch' in the actual current
window).
Solution: Remove this assumption and allow nvim_win_set_cursor() to move
the cursor on the screen to a non-current window (previous
commit).
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 303337ae98..d482f9851e 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -767,7 +767,7 @@ static uint8_t *command_line_enter(int firstc, int count, int indent, bool clear } setmouse(); - ui_cursor_shape(); // may show different cursor shape + setcursor(); TryState tstate; Error err = ERROR_INIT; @@ -927,7 +927,6 @@ static uint8_t *command_line_enter(int firstc, int count, int indent, bool clear } may_trigger_modechanged(); setmouse(); - ui_cursor_shape(); // may show different cursor shape sb_text_end_cmdline(); theend: @@ -3859,7 +3858,6 @@ void cursorcmd(void) if (ccline.redraw_state < kCmdRedrawPos) { ccline.redraw_state = kCmdRedrawPos; } - setcursor(); return; } @@ -4553,6 +4551,7 @@ static int open_cmdwin(void) State = save_State; may_trigger_modechanged(); setmouse(); + setcursor(); return cmdwin_result; } |