diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 58 | ||||
-rw-r--r-- | test/old/testdir/test_filetype.vim | 4 |
2 files changed, 60 insertions, 2 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 5de0106a8c..4c04bad3a0 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -2506,6 +2506,64 @@ bbbbbbb]]) | ]]} end) + + it('does not crash at right edge of wide window #23848', function() + screen:try_resize(82, 5) + meths.buf_set_extmark(0, ns, 0, 0, {virt_text = {{('a'):rep(82)}, {'b'}}, virt_text_pos = 'inline'}) + screen:expect{grid=[[ + ^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + b | + {1:~ }| + {1:~ }| + | + ]]} + command('set nowrap') + screen:expect{grid=[[ + ^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]} + feed('82i0<Esc>0') + screen:expect{grid=[[ + ^0000000000000000000000000000000000000000000000000000000000000000000000000000000000| + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]} + command('set wrap') + screen:expect{grid=[[ + ^0000000000000000000000000000000000000000000000000000000000000000000000000000000000| + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa| + b | + {1:~ }| + | + ]]} + end) + + it('list "extends" is drawn with only inline virtual text offscreen', function() + command('set nowrap') + command('set list') + command('set listchars+=extends:c') + meths.buf_set_extmark(0, ns, 0, 0, + { virt_text = { { 'test', 'Special' } }, virt_text_pos = 'inline' }) + insert(string.rep('a', 50)) + feed('gg0') + screen:expect { grid = [[ + ^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa{1:c}| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]} + end) end) describe('decorations: virtual lines', function() diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index fe23bd73b7..8004c35d97 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -535,7 +535,7 @@ let s:filename_checks = { \ 'services': ['/etc/services', 'any/etc/services'], \ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'], \ 'sexplib': ['file.sexp'], - \ 'sh': ['.bashrc', 'file.bash', '/usr/share/doc/bash-completion/filter.sh','/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf'], + \ 'sh': ['.bashrc', '.bash_profile', '.bash-profile', '.bash_logout', '.bash-logout', '.bash_aliases', '.bash-aliases', '/tmp/bash-fc-3Ozjlw', '/tmp/bash-fc.3Ozjlw', 'PKGBUILD', 'APKBUILD', 'file.bash', '/usr/share/doc/bash-completion/filter.sh', '/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf'], \ 'sieve': ['file.siv', 'file.sieve'], \ 'sil': ['file.sil'], \ 'simula': ['file.sim'], @@ -705,7 +705,7 @@ let s:filename_checks = { let s:filename_case_checks = { \ 'modula2': ['file.DEF'], - \ 'bzl': ['file.BUILD', 'BUILD'], + \ 'bzl': ['file.BUILD', 'BUILD', 'BUCK'], \ } func CheckItems(checks) |