diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-07-12 08:50:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-12 08:50:34 +0800 |
commit | bf52fb7193ca08ceca292cfca9156380a6661979 (patch) | |
tree | 50fd21043367b77ed5e17f6f39c9e0cbe99e47b6 /test/functional/ui/mouse_spec.lua | |
parent | bf5703042b50c858bfc4633b1807c961089ec5e1 (diff) | |
download | rneovim-bf52fb7193ca08ceca292cfca9156380a6661979.tar.gz rneovim-bf52fb7193ca08ceca292cfca9156380a6661979.tar.bz2 rneovim-bf52fb7193ca08ceca292cfca9156380a6661979.zip |
fix(mouse): copy the line before syntax matching (#24320)
Diffstat (limited to 'test/functional/ui/mouse_spec.lua')
-rw-r--r-- | test/functional/ui/mouse_spec.lua | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index d8739e1c31..621855f051 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -1024,13 +1024,15 @@ describe('ui/mouse/input', function() }) feed('ggdG') - feed_command('set concealcursor=ni') - feed_command('set nowrap') - feed_command('set shiftwidth=2 tabstop=4 list') - feed_command('setl listchars=tab:>-') - feed_command('syntax match NonText "\\*" conceal') - feed_command('syntax match NonText "cats" conceal cchar=X') - feed_command('syntax match NonText "x" conceal cchar=>') + command([[setlocal concealcursor=ni nowrap shiftwidth=2 tabstop=4 list listchars=tab:>-]]) + command([[syntax region X0 matchgroup=X1 start=/\*/ end=/\*/ concealends contains=X2]]) + command([[syntax match X2 /cats/ conceal cchar=X contained]]) + -- No heap-use-after-free with multi-line syntax pattern #24317 + command([[syntax match X3 /\n\@<=x/ conceal cchar=>]]) + command([[highlight link X0 Normal]]) + command([[highlight link X1 NonText]]) + command([[highlight link X2 NonText]]) + command([[highlight link X3 NonText]]) -- First column is there to retain the tabs. insert([[ |