diff src/testdir/test_statusline.vim @ 19354:1d3b2ce65ae0 v8.2.0235

patch 8.2.0235: draw error when an empty group is removed from 'statusline' Commit: https://github.com/vim/vim/commit/dbe5d361feb65137099644329cf0ecfd4a945a14 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 8 18:35:31 2020 +0100 patch 8.2.0235: draw error when an empty group is removed from 'statusline' Problem: Draw error when an empty group is removed from 'statusline'. Solution: Do not use highlighting from a removed group.
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Feb 2020 18:45:03 +0100
parents 068337e86133
children c087099e9163
line wrap: on
line diff
--- a/src/testdir/test_statusline.vim
+++ b/src/testdir/test_statusline.vim
@@ -8,6 +8,7 @@
 
 source view_util.vim
 source check.vim
+source screendump.vim
 
 func s:get_statusline()
   return ScreenLines(&lines - 1, &columns)[0]
@@ -393,3 +394,22 @@ func Test_statusline_visual()
   bwipe! x1
   bwipe! x2
 endfunc
+
+func Test_statusline_removed_group()
+  CheckScreendump
+
+  let lines =<< trim END
+    scriptencoding utf-8
+    set laststatus=2
+    let &statusline = '%#StatColorHi2#%(✓%#StatColorHi2#%) Q≡'
+  END
+  call writefile(lines, 'XTest_statusline')
+
+  let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 10, 'cols': 50})
+  call term_wait(buf, 100)
+  call VerifyScreenDump(buf, 'Test_statusline_1', {})
+
+  " clean up
+  call StopVimInTerminal(buf)
+  call delete('XTest_statusline')
+endfunc