mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Add new highlight groups TermCursor/TermCursorNC
These highlight groups replace the old mechanism of setting:
- {g,b}:terminal_focused_cursor_highlight
- {g,b}:terminal_unfocused_cursor_highlight
This commit is contained in:
@@ -24,10 +24,10 @@ describe(':highlight', function()
|
||||
guifg=Blue |
|
||||
EndOfBuffer xxx links to NonText|
|
||||
|
|
||||
TermCursor xxx cterm=reverse |
|
||||
gui=reverse |
|
||||
TermCursorNC xxx cleared |
|
||||
NonText xxx ctermfg=12 |
|
||||
gui=bold |
|
||||
guifg=Blue |
|
||||
Directory xxx ctermfg=4 |
|
||||
-- More --^ |
|
||||
]])
|
||||
feed('q')
|
||||
|
||||
@@ -129,10 +129,8 @@ describe('cursor with customized highlighting', function()
|
||||
|
||||
before_each(function()
|
||||
clear()
|
||||
nvim('set_var', 'terminal_focused_cursor_highlight', 'CursorFocused')
|
||||
nvim('set_var', 'terminal_unfocused_cursor_highlight', 'CursorUnfocused')
|
||||
nvim('command', 'highlight CursorFocused ctermfg=45 ctermbg=46')
|
||||
nvim('command', 'highlight CursorUnfocused ctermfg=55 ctermbg=56')
|
||||
nvim('command', 'highlight TermCursor ctermfg=45 ctermbg=46 cterm=NONE')
|
||||
nvim('command', 'highlight TermCursorNC ctermfg=55 ctermbg=56 cterm=NONE')
|
||||
screen = Screen.new(50, 7)
|
||||
screen:set_default_attr_ids({
|
||||
[1] = {foreground = 45, background = 46},
|
||||
|
||||
@@ -34,6 +34,8 @@ local function disable_mouse() feed_termcode('[?1002l') end
|
||||
|
||||
|
||||
local function screen_setup(extra_height)
|
||||
nvim('command', 'highlight TermCursor cterm=reverse')
|
||||
nvim('command', 'highlight TermCursorNC ctermbg=11')
|
||||
nvim('set_var', 'terminal_scrollback_buffer_size', 10)
|
||||
if not extra_height then extra_height = 0 end
|
||||
local screen = Screen.new(50, 7 + extra_height)
|
||||
|
||||
Reference in New Issue
Block a user