Mercurial > vim
comparison src/testdir/test_number.vim @ 18471:b9cf60801963 v8.1.2229
patch 8.1.2229: cannot color number column above/below cursor differently
Commit: https://github.com/vim/vim/commit/efae76ab1a43d5a628d8c2fa4218ace6ba597f5d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 27 22:54:58 2019 +0100
patch 8.1.2229: cannot color number column above/below cursor differently
Problem: Cannot color number column above/below cursor differently.
Solution: Add LineNrAbove and LineNrBelow. (Shaun Brady, closes https://github.com/vim/vim/issues/624)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 27 Oct 2019 23:00:03 +0100 |
parents | a513b81d3689 |
children | f6c87afa5501 |
comparison
equal
deleted
inserted
replaced
18470:0a2e927170c2 | 18471:b9cf60801963 |
---|---|
1 " Test for 'number' and 'relativenumber' | 1 " Test for 'number' and 'relativenumber' |
2 | 2 |
3 source check.vim | |
3 source view_util.vim | 4 source view_util.vim |
5 | |
6 source screendump.vim | |
4 | 7 |
5 func s:screen_lines(start, end) abort | 8 func s:screen_lines(start, end) abort |
6 return ScreenLines([a:start, a:end], 8) | 9 return ScreenLines([a:start, a:end], 8) |
7 endfunc | 10 endfunc |
8 | 11 |
261 redraw | 264 redraw |
262 call feedkeys("j", 'xt') | 265 call feedkeys("j", 'xt') |
263 redraw | 266 redraw |
264 bwipe! | 267 bwipe! |
265 endfunc | 268 endfunc |
269 | |
270 func Test_relativenumber_colors() | |
271 CheckScreendump | |
272 | |
273 let lines =<< trim [CODE] | |
274 call setline(1, range(200)) | |
275 111 | |
276 set number relativenumber | |
277 hi LineNr ctermfg=red | |
278 [CODE] | |
279 call writefile(lines, 'XTest_relnr') | |
280 | |
281 " Check that the balloon shows up after a mouse move | |
282 let buf = RunVimInTerminal('-S XTest_relnr', {'rows': 10, 'cols': 50}) | |
283 call term_wait(buf, 100) | |
284 " Default colors | |
285 call VerifyScreenDump(buf, 'Test_relnr_colors_1', {}) | |
286 | |
287 call term_sendkeys(buf, ":hi LineNrAbove ctermfg=blue\<CR>") | |
288 call VerifyScreenDump(buf, 'Test_relnr_colors_2', {}) | |
289 | |
290 call term_sendkeys(buf, ":hi LineNrBelow ctermfg=green\<CR>") | |
291 call VerifyScreenDump(buf, 'Test_relnr_colors_3', {}) | |
292 | |
293 call term_sendkeys(buf, ":hi clear LineNrAbove\<CR>") | |
294 call VerifyScreenDump(buf, 'Test_relnr_colors_4', {}) | |
295 | |
296 " clean up | |
297 call StopVimInTerminal(buf) | |
298 call delete('XTest_relnr') | |
299 endfunc |