mirror of
https://github.com/neovim/neovim.git
synced 2026-07-22 00:51:33 +00:00
vim-patch:9.1.0940: Wrong cursor shape with "gq" and 'indentexpr' executes :normal (#31616)
Problem: Wrong cursor shape with "gq" and 'indentexpr' executes :normal
Solution: Update cursor and mouse shape after restoring old_State.
(zeertzjq)
closes: vim/vim#16241
Solution: Update cursor and mouse shape after restoring old_State.
6c3027744e
This commit is contained in:
@@ -94,6 +94,46 @@ describe('ui mode_change event', function()
|
||||
}
|
||||
end)
|
||||
|
||||
-- oldtest: Test_indent_norm_with_gq()
|
||||
it('is restored to Normal mode after "gq" indents using :normal #12309', function()
|
||||
screen:try_resize(60, 6)
|
||||
n.exec([[
|
||||
func Indent()
|
||||
exe "normal! \<Ignore>"
|
||||
return 0
|
||||
endfunc
|
||||
|
||||
setlocal indentexpr=Indent()
|
||||
call setline(1, [repeat('a', 80), repeat('b', 80)])
|
||||
]])
|
||||
|
||||
feed('ggVG')
|
||||
screen:expect {
|
||||
grid = [[
|
||||
{17:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}|
|
||||
{17:aaaaaaaaaaaaaaaaaaaa} |
|
||||
^b{17:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb}|
|
||||
{17:bbbbbbbbbbbbbbbbbbbb} |
|
||||
{1:~ }|
|
||||
{5:-- VISUAL LINE --} |
|
||||
]],
|
||||
mode = 'visual',
|
||||
}
|
||||
|
||||
feed('gq')
|
||||
screen:expect {
|
||||
grid = [[
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
|
||||
aaaaaaaaaaaaaaaaaaaa |
|
||||
^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
|
||||
bbbbbbbbbbbbbbbbbbbb |
|
||||
{1:~ }|
|
||||
|
|
||||
]],
|
||||
mode = 'normal',
|
||||
}
|
||||
end)
|
||||
|
||||
it('works in insert mode', function()
|
||||
feed('i')
|
||||
screen:expect {
|
||||
|
||||
Reference in New Issue
Block a user