Mercurial > vim
comparison src/testdir/test_textprop.vim @ 30213:4fedacdad3b4 v9.0.0442
patch 9.0.0442: virtual text "above" doesn't handel line numbers
Commit: https://github.com/vim/vim/commit/79f8b8494cd4f738f25272ece94d8b524b99cb09
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 11 13:31:01 2022 +0100
patch 9.0.0442: virtual text "above" doesn't handel line numbers
Problem: Virtual text "above" doesn't handel line numbers.
Solution: Take the left column offset into account. (issue https://github.com/vim/vim/issues/11084)
Also make padding work.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 11 Sep 2022 14:45:04 +0200 |
parents | 7147c6059e80 |
children | 0d084880276a |
comparison
equal
deleted
inserted
replaced
30212:03f246119b4a | 30213:4fedacdad3b4 |
---|---|
2855 call setline(1, ['one two', 'three four', 'five six']) | 2855 call setline(1, ['one two', 'three four', 'five six']) |
2856 call prop_type_add('above1', #{highlight: 'Search'}) | 2856 call prop_type_add('above1', #{highlight: 'Search'}) |
2857 call prop_type_add('above2', #{highlight: 'DiffChange'}) | 2857 call prop_type_add('above2', #{highlight: 'DiffChange'}) |
2858 call prop_add(1, 0, #{type: 'above1', text: 'first thing above', text_align: 'above'}) | 2858 call prop_add(1, 0, #{type: 'above1', text: 'first thing above', text_align: 'above'}) |
2859 call prop_add(1, 0, #{type: 'above2', text: 'second thing above', text_align: 'above'}) | 2859 call prop_add(1, 0, #{type: 'above2', text: 'second thing above', text_align: 'above'}) |
2860 call prop_add(3, 0, #{type: 'above1', text: 'another thing', text_align: 'above'}) | 2860 call prop_add(3, 0, #{type: 'above1', text: 'another thing', text_align: 'above', text_padding_left: 3}) |
2861 | 2861 |
2862 normal gglllj | 2862 normal gglllj |
2863 END | 2863 END |
2864 call writefile(lines, 'XscriptPropsWithTextAbove', 'D') | 2864 call writefile(lines, 'XscriptPropsWithTextAbove', 'D') |
2865 let buf = RunVimInTerminal('-S XscriptPropsWithTextAbove', #{rows: 9, cols: 60}) | 2865 let buf = RunVimInTerminal('-S XscriptPropsWithTextAbove', #{rows: 9, cols: 60}) |
2867 | 2867 |
2868 call term_sendkeys(buf, "ggI") | 2868 call term_sendkeys(buf, "ggI") |
2869 call VerifyScreenDump(buf, 'Test_prop_with_text_above_2', {}) | 2869 call VerifyScreenDump(buf, 'Test_prop_with_text_above_2', {}) |
2870 call term_sendkeys(buf, "inserted \<Esc>") | 2870 call term_sendkeys(buf, "inserted \<Esc>") |
2871 call VerifyScreenDump(buf, 'Test_prop_with_text_above_3', {}) | 2871 call VerifyScreenDump(buf, 'Test_prop_with_text_above_3', {}) |
2872 | |
2873 call term_sendkeys(buf, ":set number signcolumn=yes\<CR>") | |
2874 call VerifyScreenDump(buf, 'Test_prop_with_text_above_4', {}) | |
2872 | 2875 |
2873 call StopVimInTerminal(buf) | 2876 call StopVimInTerminal(buf) |
2874 endfunc | 2877 endfunc |
2875 | 2878 |
2876 func Test_props_with_text_override() | 2879 func Test_props_with_text_override() |