diff src/testdir/test_textprop.vim @ 17143:ee090ecd70f6 v8.1.1571

patch 8.1.1571: textprop highlight starts too early if just after a tab commit https://github.com/vim/vim/commit/a956bf6ca34896c3f242bf726b709a725f9053ce Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 19 17:34:24 2019 +0200 patch 8.1.1571: textprop highlight starts too early if just after a tab Problem: textprop highlight starts too early if just after a tab. Solution: Check if still drawing a previous character. (closes https://github.com/vim/vim/issues/4558)
author Bram Moolenaar <Bram@vim.org>
date Wed, 19 Jun 2019 17:45:06 +0200
parents 8e9e9124c7a2
children a001a0d88d42
line wrap: on
line diff
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -759,6 +759,26 @@ func Test_textprop_screenshot_visual()
   call RunTestVisualBlock(4, '02')
 endfunc
 
+func Test_textprop_after_tab()
+  let lines =<< trim END
+       call setline(1, [
+             \ "\txxx",
+             \ "x\txxx",
+             \ ])
+       hi SearchProp ctermbg=yellow
+       call prop_type_add('search', {'highlight': 'SearchProp'})
+       call prop_add(1, 2, {'length': 3, 'type': 'search'})
+       call prop_add(2, 3, {'length': 3, 'type': 'search'})
+  END
+  call writefile(lines, 'XtestPropTab')
+  let buf = RunVimInTerminal('-S XtestPropTab', {'rows': 6})
+  call VerifyScreenDump(buf, 'Test_textprop_tab', {})
+
+  " clean up
+  call StopVimInTerminal(buf)
+  call delete('XtestPropTab')
+endfunc
+
 " Adding a text property to a new buffer should not fail
 func Test_textprop_empty_buffer()
   call prop_type_add('comment', {'highlight': 'Search'})