patch 8.2.4638: superfluous check if a redraw is needed for 'cursorline'
Problem: Superfluous check if a redraw is needed for 'cursorline'.
Solution: Remove check_redraw_cursorline(). (closes #10030, closes #10029)
diff --git a/src/testdir/dumps/Test_cursorcolumn_callback_1.dump b/src/testdir/dumps/Test_cursorcolumn_callback_1.dump
new file mode 100644
index 0000000..7b1b85b
--- /dev/null
+++ b/src/testdir/dumps/Test_cursorcolumn_callback_1.dump
@@ -0,0 +1,8 @@
+>a+0&#ffffff0@4| @69
+|b+0&#e0e0e08|b+0&#ffffff0@3| @69
+|c+0&#e0e0e08|c+0&#ffffff0@3| @69
+|d+0&#e0e0e08|d+0&#ffffff0@3| @69
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|4|,|5| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_relativenumber_callback_1.dump b/src/testdir/dumps/Test_relativenumber_callback_1.dump
new file mode 100644
index 0000000..f25612d
--- /dev/null
+++ b/src/testdir/dumps/Test_relativenumber_callback_1.dump
@@ -0,0 +1,8 @@
+| +0#af5f00255#ffffff0@1|0| >a+0#0000000&@4| @65
+| +0#af5f00255&@1|1| |b+0#0000000&@4| @65
+| +0#af5f00255&@1|2| |c+0#0000000&@4| @65
+| +0#af5f00255&@1|3| |d+0#0000000&@4| @65
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|4|,|1| @10|A|l@1|
diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim
index 8b3bcdc..b07ba11 100644
--- a/src/testdir/test_highlight.vim
+++ b/src/testdir/test_highlight.vim
@@ -592,6 +592,31 @@
call delete('Xtest_cursorline_with_visualmode')
endfunc
+func Test_cursorcolumn_callback()
+ CheckScreendump
+ CheckFeature timers
+
+ let lines =<< trim END
+ call setline(1, ['aaaaa', 'bbbbb', 'ccccc', 'ddddd'])
+ set cursorcolumn
+ call cursor(4, 5)
+
+ func Func(timer)
+ call cursor(1, 1)
+ endfunc
+
+ call timer_start(300, 'Func')
+ END
+ call writefile(lines, 'Xcuc_timer')
+
+ let buf = RunVimInTerminal('-S Xcuc_timer', #{rows: 8})
+ call TermWait(buf, 310)
+ call VerifyScreenDump(buf, 'Test_cursorcolumn_callback_1', {})
+
+ call StopVimInTerminal(buf)
+ call delete('Xcuc_timer')
+endfunc
+
func Test_wincolor()
CheckScreendump
" make sure the width is enough for the test
diff --git a/src/testdir/test_number.vim b/src/testdir/test_number.vim
index 78cd6f9..c2cce96 100644
--- a/src/testdir/test_number.vim
+++ b/src/testdir/test_number.vim
@@ -298,6 +298,31 @@
call delete('XTest_relnr')
endfunc
+func Test_relativenumber_callback()
+ CheckScreendump
+ CheckFeature timers
+
+ let lines =<< trim END
+ call setline(1, ['aaaaa', 'bbbbb', 'ccccc', 'ddddd'])
+ set relativenumber
+ call cursor(4, 1)
+
+ func Func(timer)
+ call cursor(1, 1)
+ endfunc
+
+ call timer_start(300, 'Func')
+ END
+ call writefile(lines, 'Xrnu_timer')
+
+ let buf = RunVimInTerminal('-S Xrnu_timer', #{rows: 8})
+ call TermWait(buf, 310)
+ call VerifyScreenDump(buf, 'Test_relativenumber_callback_1', {})
+
+ call StopVimInTerminal(buf)
+ call delete('Xrnu_timer')
+endfunc
+
" Test for displaying line numbers with 'rightleft'
func Test_number_rightleft()
CheckFeature rightleft