diff src/testdir/test_textprop.vim @ 30759:b41ccaa6fd84 v9.0.0714

patch 9.0.0714: with 'nowrap' two virtual text below not displayed correctly Commit: https://github.com/vim/vim/commit/1206c163dbc8caace86e53f375f298af6cfab75a Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 10 15:40:04 2022 +0100 patch 9.0.0714: with 'nowrap' two virtual text below not displayed correctly Problem: With 'nowrap' two virtual text below not displayed correctly. Solution: Set text_prop_follows before continuing. Correct for number column. (closes #11333)
author Bram Moolenaar <Bram@vim.org>
date Mon, 10 Oct 2022 16:45:05 +0200
parents 6fe513996997
children 8ea77a6ceff0
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -3241,6 +3241,35 @@ func Test_text_after_nowrap()
   call StopVimInTerminal(buf)
 endfunc
 
+func Test_text_below_nowrap()
+  CheckRunVimInTerminal
+
+  let lines =<< trim END
+      vim9script
+      setline(1, ['first line', 'second line '->repeat(50), 'third', 'fourth'])
+      set nowrap number
+      prop_type_add('theprop', {highlight: 'DiffChange'})
+      prop_add(1, 0, {
+          type: 'theprop',
+          text: 'one below the text '->repeat(5),
+          text_align: 'below',
+          text_padding_left: 2,
+      })
+      prop_add(1, 0, {
+          type: 'theprop',
+          text: 'two below the text '->repeat(5),
+          text_align: 'below',
+          text_padding_left: 2,
+      })
+      normal 2Gw
+  END
+  call writefile(lines, 'XTextBelowNowrap', 'D')
+  let buf = RunVimInTerminal('-S XTextBelowNowrap', #{rows: 8, cols: 60})
+  call VerifyScreenDump(buf, 'Test_text_below_nowrap_1', {})
+
+  call StopVimInTerminal(buf)
+endfunc
+
 func Test_insert_text_change_arg()
   CheckRunVimInTerminal