fix: cursor shape don't resume after :append

Problem: cursor shape don't resume after `:append`.
e.g. `seq 1000 | nvim --clean +"se gcr+=c:ver25" -`

Solution: emit missing ui event.
This commit is contained in:
phanium
2025-06-14 15:33:45 +08:00
parent 76d213efbe
commit 2c9d21f722
2 changed files with 6 additions and 0 deletions

View File

@ -2889,6 +2889,7 @@ void ex_append(exarg_T *eap)
}
}
State = MODE_NORMAL;
ui_cursor_shape();
if (eap->forceit) {
curbuf->b_p_ai = !curbuf->b_p_ai;

View File

@ -43,6 +43,11 @@ describe('ui mode_change event', function()
]],
mode = 'normal',
}
n.feed(':append<cr>')
screen:expect({ mode = 'cmdline_normal' })
n.feed('<esc>')
screen:expect({ mode = 'normal' })
end)
-- oldtest: Test_mouse_shape_after_failed_change()