Mercurial > vim
comparison src/testdir/test_textprop.vim @ 31371:1c43d8bad31d v9.0.1019
patch 9.0.1019: 'smoothscroll' and virtual text above don't work together
Commit: https://github.com/vim/vim/commit/56a40fea9c28f8fc918a0db6de4c048da241cf32
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 6 14:17:57 2022 +0000
patch 9.0.1019: 'smoothscroll' and virtual text above don't work together
Problem: 'smoothscroll' and virtual text above don't work together.
(Yee Cheng Chin)
Solution: Skip virtual text above when w_skipcol is non-zero.
(closes #11665)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 06 Dec 2022 15:30:04 +0100 |
parents | a93392e93a53 |
children | c097c18dcedb |
comparison
equal
deleted
inserted
replaced
31370:b34c56a60bcb | 31371:1c43d8bad31d |
---|---|
3111 call VerifyScreenDump(buf, 'Test_prop_below_split_line_3', {}) | 3111 call VerifyScreenDump(buf, 'Test_prop_below_split_line_3', {}) |
3112 | 3112 |
3113 call StopVimInTerminal(buf) | 3113 call StopVimInTerminal(buf) |
3114 endfunc | 3114 endfunc |
3115 | 3115 |
3116 func Test_prop_above_below_smoothscroll() | |
3117 CheckRunVimInTerminal | |
3118 | |
3119 let lines =<< trim END | |
3120 vim9script | |
3121 setline(1, range(1, 10)->mapnew((_, v) => '" line ' .. v)) | |
3122 | |
3123 set smoothscroll wrap | |
3124 call prop_type_add('mytype', {highlight: 'DiffChange'}) | |
3125 call prop_add(3, 0, {text: "insert above", type: "mytype", text_align: 'above'}) | |
3126 call prop_add(5, 0, {text: "insert above 1", type: "mytype", text_align: 'above'}) | |
3127 call prop_add(5, 0, {text: "insert above 2", type: "mytype", text_align: 'above'}) | |
3128 call prop_add(7, 0, {text: "insert below", type: "mytype", text_align: 'below'}) | |
3129 call prop_add(9, 0, {text: "insert below 1", type: "mytype", text_align: 'below'}) | |
3130 call prop_add(9, 0, {text: "insert below 2", type: "mytype", text_align: 'below'}) | |
3131 END | |
3132 call writefile(lines, 'XscriptPropsSmoothscroll', 'D') | |
3133 let buf = RunVimInTerminal('-S XscriptPropsSmoothscroll', #{rows: 8, cols: 60}) | |
3134 call VerifyScreenDump(buf, 'Test_prop_above_below_smoothscroll_1', {}) | |
3135 | |
3136 for nr in range(2, 16) | |
3137 call term_sendkeys(buf, "\<C-E>") | |
3138 call VerifyScreenDump(buf, 'Test_prop_above_below_smoothscroll_' .. nr, {}) | |
3139 endfor | |
3140 | |
3141 call StopVimInTerminal(buf) | |
3142 endfunc | |
3143 | |
3116 func Test_props_with_text_override() | 3144 func Test_props_with_text_override() |
3117 CheckRunVimInTerminal | 3145 CheckRunVimInTerminal |
3118 | 3146 |
3119 let lines =<< trim END | 3147 let lines =<< trim END |
3120 vim9script | 3148 vim9script |