comparison 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
comparison
equal deleted inserted replaced
19353:bf41a107b72a 19354:1d3b2ce65ae0
6 " %T 6 " %T
7 " %X 7 " %X
8 8
9 source view_util.vim 9 source view_util.vim
10 source check.vim 10 source check.vim
11 source screendump.vim
11 12
12 func s:get_statusline() 13 func s:get_statusline()
13 return ScreenLines(&lines - 1, &columns)[0] 14 return ScreenLines(&lines - 1, &columns)[0]
14 endfunc 15 endfunc
15 16
391 392
392 delfunc CallWordcount 393 delfunc CallWordcount
393 bwipe! x1 394 bwipe! x1
394 bwipe! x2 395 bwipe! x2
395 endfunc 396 endfunc
397
398 func Test_statusline_removed_group()
399 CheckScreendump
400
401 let lines =<< trim END
402 scriptencoding utf-8
403 set laststatus=2
404 let &statusline = '%#StatColorHi2#%(✓%#StatColorHi2#%) Q≡'
405 END
406 call writefile(lines, 'XTest_statusline')
407
408 let buf = RunVimInTerminal('-S XTest_statusline', {'rows': 10, 'cols': 50})
409 call term_wait(buf, 100)
410 call VerifyScreenDump(buf, 'Test_statusline_1', {})
411
412 " clean up
413 call StopVimInTerminal(buf)
414 call delete('XTest_statusline')
415 endfunc