Mercurial > vim
comparison src/testdir/test_statusline.vim @ 31622:1102f4777518 v9.0.1143
patch 9.0.1143: invalid memory access with bad 'statusline' value
Commit: https://github.com/vim/vim/commit/7b17eb4b063a234376c1ec909ee293e42cff290c
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 4 14:31:49 2023 +0000
patch 9.0.1143: invalid memory access with bad 'statusline' value
Problem: Invalid memory access with bad 'statusline' value.
Solution: Avoid going over the NUL at the end.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 04 Jan 2023 15:45:05 +0100 |
parents | bb797331e21b |
children | 122cfa668b95 |
comparison
equal
deleted
inserted
replaced
31621:039dcfd1ee94 | 31622:1102f4777518 |
---|---|
438 call delete('Xstatusline') | 438 call delete('Xstatusline') |
439 set statusline& | 439 set statusline& |
440 set splitbelow& | 440 set splitbelow& |
441 endfunc | 441 endfunc |
442 | 442 |
443 func Test_statusline_trailing_percent_zero() | |
444 " this was causing illegal memory access | |
445 set laststatus=2 stl=%!%0 | |
446 call assert_fails('redraw', 'E15: Invalid expression: "%0"') | |
447 set laststatus& stl& | |
448 endfunc | |
449 | |
443 func Test_statusline_visual() | 450 func Test_statusline_visual() |
444 func CallWordcount() | 451 func CallWordcount() |
445 call wordcount() | 452 call wordcount() |
446 endfunc | 453 endfunc |
447 new x1 | 454 new x1 |