Mercurial > vim
diff src/testdir/test_textprop.vim @ 30900:51ffb2dedf04 v9.0.0784
patch 9.0.0784: text prop "above" not right with 'number' and "n" in 'cpo'
Commit: https://github.com/vim/vim/commit/b99e6e6c5fbabbade6431fb555c4fe7409a9269a
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Oct 17 18:55:03 2022 +0100
patch 9.0.0784: text prop "above" not right with 'number' and "n" in 'cpo'
Problem: Text prop "above" not displayed correctly with 'number' and "n" in
'cpo'.
Solution: Draw the line number column until the line text is reached.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 17 Oct 2022 20:00:04 +0200 |
parents | f4956427ee9e |
children | 360f286b5869 |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -2964,6 +2964,37 @@ func Test_prop_above_with_indent() call prop_type_delete('indented') endfunc +func Test_prop_above_with_number() + CheckRunVimInTerminal + + let lines =<< trim END + vim9script + setline(1, ['one one one', 'two two two', 'three three three']) + set number cpo+=n + prop_type_add('test', {highlight: 'DiffChange'}) + prop_add(2, 0, { + text: 'above the text', + type: 'test', + text_align: 'above', + }) + def g:OneMore() + prop_add(2, 0, { + text: 'also above the text', + type: 'test', + text_align: 'above', + }) + enddef + END + call writefile(lines, 'XscriptPropAboveNr', 'D') + let buf = RunVimInTerminal('-S XscriptPropAboveNr', #{rows: 8}) + call VerifyScreenDump(buf, 'Test_prop_above_number_1', {}) + + call term_sendkeys(buf, ":call OneMore()\<CR>") + call VerifyScreenDump(buf, 'Test_prop_above_number_2', {}) + + call StopVimInTerminal(buf) +endfunc + func Test_prop_below_split_line() CheckRunVimInTerminal