commit 0015a105ca7c18e82689e2d43de2569cca63ab87
parent 272dba7f07f82f260567a792ae824e98c52e3709
Author: luukvbaal <luukvbaal@gmail.com>
Date: Wed, 30 Apr 2025 13:51:14 +0200
fix(cmdline): do not move UI cursor when entering cmdline #33729
Problem: Cursor is still moved to curwin when entering cmdline (after d41b8d47).
Solution: Remove call to `setcursor()`.
Diffstat:
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
@@ -795,7 +795,6 @@ static uint8_t *command_line_enter(int firstc, int count, int indent, bool clear
}
setmouse();
- setcursor();
s->cmdline_type = firstc > 0 ? firstc : '-';
Error err = ERROR_INIT;
diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua
@@ -125,8 +125,8 @@ describe('ui/ext_messages', function()
feed(':%s/i/X/gc<cr>')
screen:expect({
grid = [[
- l{2:^i}ne 1 |
- l{10:i}ne 2 |
+ l{2:i}ne 1 |
+ l{10:i}ne ^2 |
{1:~ }|*3
]],
cmdline = {
@@ -1351,7 +1351,7 @@ stack traceback:
feed('z=')
screen:expect({
grid = [[
- {100:^helllo} |
+ {100:helll^o} |
{1:~ }|*4
]],
cmdline = {
@@ -1374,7 +1374,7 @@ stack traceback:
feed('1')
screen:expect({
grid = [[
- {100:^helllo} |
+ {100:helll^o} |
{1:~ }|*4
]],
cmdline = {