comparison src/testdir/test_textprop.vim @ 30741:11875afe85b2 v9.0.0705

patch 9.0.0705: virtual text truncation does not take padding into account Commit: https://github.com/vim/vim/commit/13845c48d8ca96e0fa5bb237db519dd00045742f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 9 15:26:03 2022 +0100 patch 9.0.0705: virtual text truncation does not take padding into account Problem: Virtual text truncation does not take padding into account. Solution: Subtract the padding from the available space. (closes https://github.com/vim/vim/issues/11318)
author Bram Moolenaar <Bram@vim.org>
date Sun, 09 Oct 2022 16:30:03 +0200
parents 748b8dcfba57
children 6fe513996997
comparison
equal deleted inserted replaced
30740:71a6ce174473 30741:11875afe85b2
3181 call VerifyScreenDump(buf, 'Test_prop_text_with_padding_4', {}) 3181 call VerifyScreenDump(buf, 'Test_prop_text_with_padding_4', {})
3182 3182
3183 call StopVimInTerminal(buf) 3183 call StopVimInTerminal(buf)
3184 endfunc 3184 endfunc
3185 3185
3186 func Test_long_text_below_with_padding()
3187 CheckRunVimInTerminal
3188
3189 let lines =<< trim END
3190 vim9script
3191 setline(1, ['first line', 'second line'])
3192 prop_type_add('theprop', {highlight: 'DiffChange'})
3193 prop_add(1, 0, {
3194 type: 'theprop',
3195 text: 'after '->repeat(20),
3196 text_align: 'below',
3197 text_padding_left: 3,
3198 })
3199 prop_add(1, 0, {
3200 type: 'theprop',
3201 text: 'more '->repeat(20),
3202 text_align: 'below',
3203 text_padding_left: 30,
3204 })
3205 normal 2Gw
3206 END
3207 call writefile(lines, 'XlongTextBelowWithPadding', 'D')
3208 let buf = RunVimInTerminal('-S XlongTextBelowWithPadding', #{rows: 8, cols: 60})
3209 call VerifyScreenDump(buf, 'Test_long_text_with_padding_1', {})
3210
3211 call StopVimInTerminal(buf)
3212 endfunc
3213
3186 func Test_insert_text_change_arg() 3214 func Test_insert_text_change_arg()
3187 CheckRunVimInTerminal 3215 CheckRunVimInTerminal
3188 3216
3189 let lines =<< trim END 3217 let lines =<< trim END
3190 vim9script 3218 vim9script