]> granicus.if.org Git - vim/commitdiff
patch 8.1.2206: no test for fixed issue #3893 v8.1.2206
authorBram Moolenaar <Bram@vim.org>
Thu, 24 Oct 2019 13:12:37 +0000 (15:12 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 24 Oct 2019 13:12:37 +0000 (15:12 +0200)
Problem:    No test for fixed issue #3893.
Solution:   Add a test. (Christian Brabandt, #3893)

src/testdir/dumps/Test_winline_rnu.dump [new file with mode: 0644]
src/testdir/test_display.vim
src/version.c

diff --git a/src/testdir/dumps/Test_winline_rnu.dump b/src/testdir/dumps/Test_winline_rnu.dump
new file mode 100644 (file)
index 0000000..31d579e
--- /dev/null
@@ -0,0 +1,5 @@
+|1+8#5fafaf255#303030255| @2> +0#0000000#ffffff0@45
+| +0#af5f00255&@1|1| |a+0#0000000&@45
+| +0#af5f00255&@3|a+0#0000000&@45
+| +0#af5f00255&@3|a+0#0000000&@17| @27
+@32|1|,|0|-|1| @8|A|l@1| 
index f500dc7891e8e07cbfde61fed2bd4d455d903095..a25d2cfe08fb9cd1e2839bd39b24b9f2a13bd06e 100644 (file)
@@ -158,3 +158,26 @@ func Test_display_listchars_precedes()
   set list& listchars& wrap&
   bw!
 endfunc
+
+" Check that win_lines() works correctly with the number_only parameter=TRUE
+" should break early to optimize cost of drawing, but needs to make sure
+" that the number column is correctly highlighted.
+func Test_scroll_CursorLineNr_update()
+  CheckScreendump
+
+  let lines =<< trim END
+    hi CursorLineNr ctermfg=73 ctermbg=236
+    set nu rnu cursorline cursorlineopt=number
+    exe ":norm! o\<esc>110ia\<esc>"
+  END
+  let filename = 'Xdrawscreen'
+  call writefile(lines, filename)
+  let buf = RunVimInTerminal('-S '.filename, #{rows: 5, cols: 50})
+  call term_sendkeys(buf, "k")
+  call term_wait(buf)
+  call VerifyScreenDump(buf, 'Test_winline_rnu', {})
+
+  " clean up
+  call StopVimInTerminal(buf)
+  call delete(filename)
+endfunc
index 057ab74a84446487e58903da251c7b30d7620b48..e6a66be3cc555113f2c0a3b454d31c23dc880142 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2206,
 /**/
     2205,
 /**/