Mercurial > vim
diff src/testdir/test_textprop.vim @ 31990:27ab829631df v9.0.1327
patch 9.0.1327: cursor in wrong position below line with virtual text below
Commit: https://github.com/vim/vim/commit/ea62cee85e9e77ec86edd9843926dadb69978753
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Feb 19 18:36:41 2023 +0000
patch 9.0.1327: cursor in wrong position below line with virtual text below
Problem: Cursor in wrong position below line with virtual text below ending
in multi-byte character.
Solution: When checking for last character take care of multi-byte
character.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 Feb 2023 19:45:03 +0100 |
parents | a7801ecf7df9 |
children | 533e36e02a68 |
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim +++ b/src/testdir/test_textprop.vim @@ -2817,6 +2817,27 @@ func Test_prop_with_text_above_below_emp call StopVimInTerminal(buf) endfunc +func Test_prop_with_multibyte_below() + CheckRunVimInTerminal + + let lines =<< trim END + setlocal number + call setline(1, ['©', '©', '©']) + + let vt = 'test' + call prop_type_add(vt, {'highlight': 'ToDo'}) + for ln in range(1, line('$')) + call prop_add(ln, 0, {'type': vt, 'text': '+++', 'text_align': 'below'}) + endfor + normal G + END + call writefile(lines, 'XscriptPropMultibyteBelow', 'D') + let buf = RunVimInTerminal('-S XscriptPropMultibyteBelow', #{rows: 10, cols: 60}) + call VerifyScreenDump(buf, 'Test_prop_multibyte_below_1', {}) + + call StopVimInTerminal(buf) +endfunc + func Test_prop_with_text_above_empty() CheckRunVimInTerminal