mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
Merge pull request #26334 from echasnovski/default-colorscheme
feat(highlight): update default color scheme
This commit is contained in:
commit
0d885247b0
@ -1,12 +1,10 @@
|
||||
" Vim color file
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Neovim color file
|
||||
" Maintainer: The Neovim Project <https://github.com/neovim/neovim>
|
||||
" Last Change: 2023 Dec 01
|
||||
|
||||
" This is the default color scheme. It doesn't define the Normal
|
||||
" highlighting, it uses whatever the colors used to be.
|
||||
" This is the default color scheme.
|
||||
|
||||
" Set 'background' back to the default. The value can't always be estimated
|
||||
" Set 'background' back to the default. The value can't always be estimated
|
||||
" and is then guessed.
|
||||
hi clear Normal
|
||||
set bg&
|
||||
|
269
runtime/colors/vim.vim
Normal file
269
runtime/colors/vim.vim
Normal file
@ -0,0 +1,269 @@
|
||||
" Name: vim
|
||||
" Description: Vim's default color scheme
|
||||
" Author: Bram Moolenaar <Bram@vim.org>
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Website: https://github.com/vim/vim
|
||||
" License: Same as Vim
|
||||
" Last Updated: 2023 Aug 10
|
||||
|
||||
" This is Vim's default color scheme. It doesn't define the Normal
|
||||
" highlighting, it uses whatever the colors used to be.
|
||||
|
||||
hi clear
|
||||
let g:colors_name = 'vim'
|
||||
|
||||
" General
|
||||
hi Conceal guifg=LightGrey guibg=DarkGrey guisp=NONE gui=NONE ctermfg=LightGrey ctermbg=DarkGrey cterm=NONE
|
||||
hi Cursor guifg=bg guibg=fg guisp=NONE gui=NONE ctermfg=bg ctermbg=fg cterm=NONE
|
||||
hi lCursor guifg=bg guibg=fg guisp=NONE gui=NONE ctermfg=bg ctermbg=fg cterm=NONE
|
||||
hi DiffText guifg=NONE guibg=Red guisp=NONE gui=bold ctermfg=NONE ctermbg=Red cterm=bold
|
||||
hi ErrorMsg guifg=White guibg=Red guisp=NONE gui=NONE ctermfg=White ctermbg=DarkRed cterm=NONE
|
||||
hi IncSearch guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi ModeMsg guifg=NONE guibg=NONE guisp=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi NonText guifg=Blue guibg=NONE guisp=NONE gui=bold ctermfg=Blue ctermbg=NONE cterm=NONE
|
||||
hi Normal guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi PmenuSbar guifg=NONE guibg=Grey guisp=NONE gui=NONE ctermfg=NONE ctermbg=Grey cterm=NONE
|
||||
hi StatusLine guifg=NONE guibg=NONE guisp=NONE gui=reverse,bold ctermfg=NONE ctermbg=NONE cterm=reverse,bold
|
||||
hi StatusLineNC guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi TabLineFill guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi TabLineSel guifg=NONE guibg=NONE guisp=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi TermCursor guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi WinBar guifg=NONE guibg=NONE guisp=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi WildMenu guifg=Black guibg=Yellow guisp=NONE gui=NONE ctermfg=Black ctermbg=Yellow cterm=NONE
|
||||
hi! link VertSplit Normal
|
||||
hi! link WinSeparator VertSplit
|
||||
hi! link WinBarNC WinBar
|
||||
hi! link EndOfBuffer NonText
|
||||
hi! link LineNrAbove LineNr
|
||||
hi! link LineNrBelow LineNr
|
||||
hi! link QuickFixLine Search
|
||||
hi! link CursorLineSign SignColumn
|
||||
hi! link CursorLineFold FoldColumn
|
||||
hi! link CurSearch Search
|
||||
hi! link PmenuKind Pmenu
|
||||
hi! link PmenuKindSel PmenuSel
|
||||
hi! link PmenuExtra Pmenu
|
||||
hi! link PmenuExtraSel PmenuSel
|
||||
hi! link Substitute Search
|
||||
hi! link Whitespace NonText
|
||||
hi! link MsgSeparator StatusLine
|
||||
hi! link NormalFloat Pmenu
|
||||
hi! link FloatBorder WinSeparator
|
||||
hi! link FloatTitle Title
|
||||
hi! link FloatFooter Title
|
||||
hi FloatShadow guifg=NONE guibg=Black guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE blend=80
|
||||
hi FloatShadowThrough guifg=NONE guibg=Black guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE blend=100
|
||||
hi RedrawDebugNormal guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi RedrawDebugClear guifg=NONE guibg=Yellow guisp=NONE gui=NONE ctermfg=NONE ctermbg=Yellow cterm=NONE
|
||||
hi RedrawDebugComposed guifg=NONE guibg=Green guisp=NONE gui=NONE ctermfg=NONE ctermbg=Green cterm=NONE
|
||||
hi RedrawDebugRecompose guifg=NONE guibg=Red guisp=NONE gui=NONE ctermfg=NONE ctermbg=Red cterm=NONE
|
||||
hi Error guifg=White guibg=Red guisp=NONE gui=NONE ctermfg=White ctermbg=Red cterm=NONE term=reverse
|
||||
hi Todo guifg=Blue guibg=Yellow guisp=NONE gui=NONE ctermfg=Black ctermbg=Yellow cterm=NONE term=standout
|
||||
hi! link String Constant
|
||||
hi! link Character Constant
|
||||
hi! link Number Constant
|
||||
hi! link Boolean Constant
|
||||
hi! link Float Number
|
||||
hi! link Function Identifier
|
||||
hi! link Conditional Statement
|
||||
hi! link Repeat Statement
|
||||
hi! link Label Statement
|
||||
hi! link Operator Statement
|
||||
hi! link Keyword Statement
|
||||
hi! link Exception Statement
|
||||
hi! link Include PreProc
|
||||
hi! link Define PreProc
|
||||
hi! link Macro PreProc
|
||||
hi! link PreCondit PreProc
|
||||
hi! link StorageClass Type
|
||||
hi! link Structure Type
|
||||
hi! link Typedef Type
|
||||
hi! link Tag Special
|
||||
hi! link SpecialChar Special
|
||||
hi! link Delimiter Special
|
||||
hi! link SpecialComment Special
|
||||
hi! link Debug Special
|
||||
hi DiagnosticError guifg=Red guibg=NONE guisp=NONE gui=NONE ctermfg=1 ctermbg=NONE cterm=NONE
|
||||
hi DiagnosticWarn guifg=Orange guibg=NONE guisp=NONE gui=NONE ctermfg=3 ctermbg=NONE cterm=NONE
|
||||
hi DiagnosticInfo guifg=LightBlue guibg=NONE guisp=NONE gui=NONE ctermfg=4 ctermbg=NONE cterm=NONE
|
||||
hi DiagnosticHint guifg=LightGrey guibg=NONE guisp=NONE gui=NONE ctermfg=7 ctermbg=NONE cterm=NONE
|
||||
hi DiagnosticOk guifg=LightGreen guibg=NONE guisp=NONE gui=NONE ctermfg=10 ctermbg=NONE cterm=NONE
|
||||
hi DiagnosticUnderlineError guifg=NONE guibg=NONE guisp=Red gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi DiagnosticUnderlineWarn guifg=NONE guibg=NONE guisp=Orange gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi DiagnosticUnderlineInfo guifg=NONE guibg=NONE guisp=LightBlue gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi DiagnosticUnderlineHint guifg=NONE guibg=NONE guisp=LightGrey gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi DiagnosticUnderlineOk guifg=NONE guibg=NONE guisp=LightGreen gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi! link DiagnosticVirtualTextError DiagnosticError
|
||||
hi! link DiagnosticVirtualTextWarn DiagnosticWarn
|
||||
hi! link DiagnosticVirtualTextInfo DiagnosticInfo
|
||||
hi! link DiagnosticVirtualTextHint DiagnosticHint
|
||||
hi! link DiagnosticVirtualTextOk DiagnosticOk
|
||||
hi! link DiagnosticFloatingError DiagnosticError
|
||||
hi! link DiagnosticFloatingWarn DiagnosticWarn
|
||||
hi! link DiagnosticFloatingInfo DiagnosticInfo
|
||||
hi! link DiagnosticFloatingHint DiagnosticHint
|
||||
hi! link DiagnosticFloatingOk DiagnosticOk
|
||||
hi! link DiagnosticSignError DiagnosticError
|
||||
hi! link DiagnosticSignWarn DiagnosticWarn
|
||||
hi! link DiagnosticSignInfo DiagnosticInfo
|
||||
hi! link DiagnosticSignHint DiagnosticHint
|
||||
hi! link DiagnosticSignOk DiagnosticOk
|
||||
hi DiagnosticDeprecated guifg=NONE guibg=NONE guisp=Red gui=strikethrough ctermfg=NONE ctermbg=NONE cterm=strikethrough
|
||||
hi! link DiagnosticUnnecessary Comment
|
||||
hi! link LspInlayHint NonText
|
||||
hi! link SnippetTabstop Visual
|
||||
|
||||
" Text
|
||||
hi! link @text.literal Comment
|
||||
hi! link @text.reference Identifier
|
||||
hi! link @text.title Title
|
||||
hi! link @text.uri Underlined
|
||||
hi! link @text.underline Underlined
|
||||
hi! link @text.todo Todo
|
||||
|
||||
" Miscs
|
||||
hi! link @comment Comment
|
||||
hi! link @punctuation Delimiter
|
||||
|
||||
" Constants
|
||||
hi! link @constant Constant
|
||||
hi! link @constant.builtin Special
|
||||
hi! link @constant.macro Define
|
||||
hi! link @define Define
|
||||
hi! link @macro Macro
|
||||
hi! link @string String
|
||||
hi! link @string.escape SpecialChar
|
||||
hi! link @string.special SpecialChar
|
||||
hi! link @character Character
|
||||
hi! link @character.special SpecialChar
|
||||
hi! link @number Number
|
||||
hi! link @boolean Boolean
|
||||
hi! link @float Float
|
||||
|
||||
" Functions
|
||||
hi! link @function Function
|
||||
hi! link @function.builtin Special
|
||||
hi! link @function.macro Macro
|
||||
hi! link @parameter Identifier
|
||||
hi! link @method Function
|
||||
hi! link @field Identifier
|
||||
hi! link @property Identifier
|
||||
hi! link @constructor Special
|
||||
|
||||
" Keywords
|
||||
hi! link @conditional Conditional
|
||||
hi! link @repeat Repeat
|
||||
hi! link @label Label
|
||||
hi! link @operator Operator
|
||||
hi! link @keyword Keyword
|
||||
hi! link @exception Exception
|
||||
|
||||
hi! link @variable Identifier
|
||||
hi! link @type Type
|
||||
hi! link @type.definition Typedef
|
||||
hi! link @storageclass StorageClass
|
||||
hi! link @namespace Identifier
|
||||
hi! link @include Include
|
||||
hi! link @preproc PreProc
|
||||
hi! link @debug Debug
|
||||
hi! link @tag Tag
|
||||
|
||||
" LSP semantic tokens
|
||||
hi! link @lsp.type.class Structure
|
||||
hi! link @lsp.type.comment Comment
|
||||
hi! link @lsp.type.decorator Function
|
||||
hi! link @lsp.type.enum Structure
|
||||
hi! link @lsp.type.enumMember Constant
|
||||
hi! link @lsp.type.function Function
|
||||
hi! link @lsp.type.interface Structure
|
||||
hi! link @lsp.type.macro Macro
|
||||
hi! link @lsp.type.method Function
|
||||
hi! link @lsp.type.namespace Structure
|
||||
hi! link @lsp.type.parameter Identifier
|
||||
hi! link @lsp.type.property Identifier
|
||||
hi! link @lsp.type.struct Structure
|
||||
hi! link @lsp.type.type Type
|
||||
hi! link @lsp.type.typeParameter TypeDef
|
||||
hi! link @lsp.type.variable Identifier
|
||||
|
||||
if &background ==# 'light'
|
||||
" Default colors only used with a light background.
|
||||
hi ColorColumn guifg=NONE guibg=LightRed guisp=NONE gui=NONE ctermfg=NONE ctermbg=LightRed cterm=NONE
|
||||
hi CursorColumn guifg=NONE guibg=Grey90 guisp=NONE gui=NONE ctermfg=NONE ctermbg=LightGrey cterm=NONE
|
||||
hi CursorLine guifg=NONE guibg=Grey90 guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi CursorLineNr guifg=Brown guibg=NONE guisp=NONE gui=bold ctermfg=Brown ctermbg=NONE cterm=underline
|
||||
hi DiffAdd guifg=NONE guibg=LightBlue guisp=NONE gui=NONE ctermfg=NONE ctermbg=LightBlue cterm=NONE
|
||||
hi DiffChange guifg=NONE guibg=LightMagenta guisp=NONE gui=NONE ctermfg=NONE ctermbg=LightMagenta cterm=NONE
|
||||
hi DiffDelete guifg=Blue guibg=LightCyan guisp=NONE gui=bold ctermfg=Blue ctermbg=LightCyan cterm=NONE
|
||||
hi Directory guifg=Blue guibg=NONE guisp=NONE gui=NONE ctermfg=DarkBlue ctermbg=NONE cterm=NONE
|
||||
hi FoldColumn guifg=DarkBlue guibg=Grey guisp=NONE gui=NONE ctermfg=DarkBlue ctermbg=Grey cterm=NONE
|
||||
hi Folded guifg=DarkBlue guibg=LightGrey guisp=NONE gui=NONE ctermfg=DarkBlue ctermbg=Grey cterm=NONE
|
||||
hi LineNr guifg=Brown guibg=NONE guisp=NONE gui=NONE ctermfg=Brown ctermbg=NONE cterm=NONE
|
||||
hi MatchParen guifg=NONE guibg=Cyan guisp=NONE gui=NONE ctermfg=NONE ctermbg=Cyan cterm=NONE
|
||||
hi MoreMsg guifg=SeaGreen guibg=NONE guisp=NONE gui=bold ctermfg=DarkGreen ctermbg=NONE cterm=NONE
|
||||
hi Pmenu guifg=NONE guibg=LightMagenta guisp=NONE gui=NONE ctermfg=Black ctermbg=LightMagenta cterm=NONE
|
||||
hi PmenuSel guifg=NONE guibg=Grey guisp=NONE gui=NONE ctermfg=Black ctermbg=LightGrey cterm=NONE blend=NONE
|
||||
hi PmenuThumb guifg=NONE guibg=Black guisp=NONE gui=NONE ctermfg=NONE ctermbg=Black cterm=NONE
|
||||
hi Question guifg=SeaGreen guibg=NONE guisp=NONE gui=bold ctermfg=DarkGreen ctermbg=NONE cterm=NONE
|
||||
hi Search guifg=NONE guibg=Yellow guisp=NONE gui=NONE ctermfg=NONE ctermbg=Yellow cterm=NONE
|
||||
hi SignColumn guifg=DarkBlue guibg=Grey guisp=NONE gui=NONE ctermfg=DarkBlue ctermbg=Grey cterm=NONE
|
||||
hi SpecialKey guifg=Blue guibg=NONE guisp=NONE gui=NONE ctermfg=DarkBlue ctermbg=NONE cterm=NONE
|
||||
hi SpellBad guifg=NONE guibg=NONE guisp=Red gui=undercurl ctermfg=NONE ctermbg=LightRed cterm=NONE
|
||||
hi SpellCap guifg=NONE guibg=NONE guisp=Blue gui=undercurl ctermfg=NONE ctermbg=LightBlue cterm=NONE
|
||||
hi SpellLocal guifg=NONE guibg=NONE guisp=DarkCyan gui=undercurl ctermfg=NONE ctermbg=Cyan cterm=NONE
|
||||
hi SpellRare guifg=NONE guibg=NONE guisp=Magenta gui=undercurl ctermfg=NONE ctermbg=LightMagenta cterm=NONE
|
||||
hi TabLine guifg=NONE guibg=LightGrey guisp=NONE gui=underline ctermfg=black ctermbg=LightGrey cterm=underline
|
||||
hi Title guifg=Magenta guibg=NONE guisp=NONE gui=bold ctermfg=DarkMagenta ctermbg=NONE cterm=NONE
|
||||
hi Visual guifg=NONE guibg=LightGrey guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WarningMsg guifg=Red guibg=NONE guisp=NONE gui=NONE ctermfg=DarkRed ctermbg=NONE cterm=NONE
|
||||
hi Comment guifg=Blue guibg=NONE guisp=NONE gui=NONE ctermfg=DarkBlue ctermbg=NONE cterm=NONE term=bold
|
||||
hi Constant guifg=Magenta guibg=NONE guisp=NONE gui=NONE ctermfg=DarkRed ctermbg=NONE cterm=NONE term=underline
|
||||
hi Special guifg=#6a5acd guibg=NONE guisp=NONE gui=NONE ctermfg=DarkMagenta ctermbg=NONE cterm=NONE term=bold
|
||||
hi Identifier guifg=DarkCyan guibg=NONE guisp=NONE gui=NONE ctermfg=DarkCyan ctermbg=NONE cterm=NONE term=underline
|
||||
hi Statement guifg=Brown guibg=NONE guisp=NONE gui=bold ctermfg=Brown ctermbg=NONE cterm=NONE term=bold
|
||||
hi PreProc guifg=#6a0dad guibg=NONE guisp=NONE gui=NONE ctermfg=DarkMagenta ctermbg=NONE cterm=NONE term=underline
|
||||
hi Type guifg=SeaGreen guibg=NONE guisp=NONE gui=bold ctermfg=DarkGreen ctermbg=NONE cterm=NONE term=underline
|
||||
hi Underlined guifg=SlateBlue guibg=NONE guisp=NONE gui=underline ctermfg=DarkMagenta ctermbg=NONE cterm=underline term=underline
|
||||
hi Ignore guifg=bg guibg=NONE guisp=NONE gui=NONE ctermfg=white ctermbg=NONE cterm=NONE term=NONE
|
||||
else
|
||||
" Default colors only used with a dark background.
|
||||
hi ColorColumn guifg=NONE guibg=DarkRed guisp=NONE gui=NONE ctermfg=NONE ctermbg=DarkRed cterm=NONE
|
||||
hi CursorColumn guifg=NONE guibg=Grey40 guisp=NONE gui=NONE ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi CursorLine guifg=NONE guibg=Grey40 guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi CursorLineNr guifg=Yellow guibg=NONE guisp=NONE gui=bold ctermfg=Yellow ctermbg=NONE cterm=underline
|
||||
hi DiffAdd guifg=NONE guibg=DarkBlue guisp=NONE gui=NONE ctermfg=NONE ctermbg=DarkBlue cterm=NONE
|
||||
hi DiffChange guifg=NONE guibg=DarkMagenta guisp=NONE gui=NONE ctermfg=NONE ctermbg=DarkMagenta cterm=NONE
|
||||
hi DiffDelete guifg=Blue guibg=DarkCyan guisp=NONE gui=bold ctermfg=Blue ctermbg=DarkCyan cterm=NONE
|
||||
hi Directory guifg=Cyan guibg=NONE guisp=NONE gui=NONE ctermfg=LightCyan ctermbg=NONE cterm=NONE
|
||||
hi FoldColumn guifg=Cyan guibg=Grey guisp=NONE gui=NONE ctermfg=Cyan ctermbg=DarkGrey cterm=NONE
|
||||
hi Folded guifg=Cyan guibg=DarkGrey guisp=NONE gui=NONE ctermfg=Cyan ctermbg=DarkGrey cterm=NONE
|
||||
hi LineNr guifg=Yellow guibg=NONE guisp=NONE gui=NONE ctermfg=Yellow ctermbg=NONE cterm=NONE
|
||||
hi MatchParen guifg=NONE guibg=DarkCyan guisp=NONE gui=NONE ctermfg=NONE ctermbg=DarkCyan cterm=NONE
|
||||
hi MoreMsg guifg=SeaGreen guibg=NONE guisp=NONE gui=bold ctermfg=LightGreen ctermbg=NONE cterm=NONE
|
||||
hi Pmenu guifg=NONE guibg=Magenta guisp=NONE gui=NONE ctermfg=Black ctermbg=Magenta cterm=NONE
|
||||
hi PmenuSel guifg=NONE guibg=DarkGrey guisp=NONE gui=NONE ctermfg=DarkGrey ctermbg=Black cterm=NONE blend=NONE
|
||||
hi PmenuThumb guifg=NONE guibg=White guisp=NONE gui=NONE ctermfg=NONE ctermbg=White cterm=NONE
|
||||
hi Question guifg=Green guibg=NONE guisp=NONE gui=bold ctermfg=LightGreen ctermbg=NONE cterm=NONE
|
||||
hi Search guifg=Black guibg=Yellow guisp=NONE gui=NONE ctermfg=Black ctermbg=Yellow cterm=NONE
|
||||
hi SignColumn guifg=Cyan guibg=Grey guisp=NONE gui=NONE ctermfg=Cyan ctermbg=DarkGrey cterm=NONE
|
||||
hi SpecialKey guifg=Cyan guibg=NONE guisp=NONE gui=NONE ctermfg=LightBlue ctermbg=NONE cterm=NONE
|
||||
hi SpellBad guifg=NONE guibg=NONE guisp=Red gui=undercurl ctermfg=NONE ctermbg=Red cterm=NONE
|
||||
hi SpellCap guifg=NONE guibg=NONE guisp=Blue gui=undercurl ctermfg=NONE ctermbg=Blue cterm=NONE
|
||||
hi SpellLocal guifg=NONE guibg=NONE guisp=Cyan gui=undercurl ctermfg=NONE ctermbg=Cyan cterm=NONE
|
||||
hi SpellRare guifg=NONE guibg=NONE guisp=Magenta gui=undercurl ctermfg=NONE ctermbg=Magenta cterm=NONE
|
||||
hi TabLine guifg=NONE guibg=DarkGrey guisp=NONE gui=underline ctermfg=white ctermbg=DarkGrey cterm=underline
|
||||
hi Title guifg=Magenta guibg=NONE guisp=NONE gui=bold ctermfg=LightMagenta ctermbg=NONE cterm=NONE
|
||||
hi Visual guifg=NONE guibg=DarkGrey guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WarningMsg guifg=Red guibg=NONE guisp=NONE gui=NONE ctermfg=LightRed ctermbg=NONE cterm=NONE
|
||||
hi Comment guifg=#80a0ff guibg=NONE guisp=NONE gui=NONE ctermfg=Cyan ctermbg=NONE cterm=NONE term=bold
|
||||
hi Constant guifg=#ffa0a0 guibg=NONE guisp=NONE gui=NONE ctermfg=Magenta ctermbg=NONE cterm=NONE term=underline
|
||||
hi Special guifg=Orange guibg=NONE guisp=NONE gui=NONE ctermfg=LightRed ctermbg=NONE cterm=NONE term=bold
|
||||
hi Identifier guifg=#40ffff guibg=NONE guisp=NONE gui=NONE ctermfg=Cyan ctermbg=NONE cterm=bold term=underline
|
||||
hi Statement guifg=#ffff60 guibg=NONE guisp=NONE gui=bold ctermfg=Yellow ctermbg=NONE cterm=NONE term=bold
|
||||
hi PreProc guifg=#ff80ff guibg=NONE guisp=NONE gui=NONE ctermfg=LightBlue ctermbg=NONE cterm=NONE term=underline
|
||||
hi Type guifg=#60ff60 guibg=NONE guisp=NONE gui=bold ctermfg=LightGreen ctermbg=NONE cterm=NONE term=underline
|
||||
hi Underlined guifg=#80a0ff guibg=NONE guisp=NONE gui=underline ctermfg=LightBlue ctermbg=NONE cterm=underline term=underline
|
||||
hi Ignore guifg=bg guibg=NONE guisp=NONE gui=NONE ctermfg=black ctermbg=NONE cterm=NONE term=NONE
|
||||
endif
|
||||
|
||||
" vim: sw=2
|
103
runtime/doc/dev_theme.txt
Normal file
103
runtime/doc/dev_theme.txt
Normal file
@ -0,0 +1,103 @@
|
||||
*dev_theme.txt* Nvim
|
||||
|
||||
|
||||
NVIM REFERENCE MANUAL
|
||||
|
||||
|
||||
Nvim theme style guide *dev-theme*
|
||||
|
||||
This is style guide for developers working on Nvim's default color scheme.
|
||||
|
||||
License: CC-By 3.0 https://creativecommons.org/licenses/by/3.0/
|
||||
|
||||
Type |gO| to see the table of contents.
|
||||
|
||||
==============================================================================
|
||||
Design
|
||||
|
||||
- Be "Neovim branded", i.e. have mostly "green-blue" feel plus one or two
|
||||
colors reserved for very occasional user attention.
|
||||
|
||||
- Be extra minimal for 'notermguicolors' (256 colors) while allowing a bit
|
||||
more shades when 'termguicolors' is set (true colors).
|
||||
|
||||
- Be accessible, i.e. have high enough contrast ratio (as defined in
|
||||
https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).
|
||||
This means to have value at least 7 for |hl-Normal| and 4.5 for some common
|
||||
cases (|hl-Visual|, `Comment` with set 'cursorline', colored syntax, `Diff*`,
|
||||
|hl-Search|).
|
||||
|
||||
- Be suitable for dark and light backgrounds via exchange of dark and light
|
||||
palettes.
|
||||
|
||||
- Be usable, i.e. provide enough visual feedback for common objects.
|
||||
|
||||
|
||||
==============================================================================
|
||||
Palettes
|
||||
|
||||
- There are two separate palettes: dark and light. They all contain the same
|
||||
set of colors exported as `NvimDark*` and `NvimLight*` colors respectively.
|
||||
|
||||
- The dark palette is used for background in the dark color scheme and for
|
||||
foreground in the light color scheme; and vice versa. This introduces
|
||||
recognizable visual system without too standing out.
|
||||
|
||||
- Actual computation of palettes should be done in a perceptually uniform
|
||||
color space. Oklch is a good choice.
|
||||
|
||||
- Each palette has the following colors (descriptions are for dark background;
|
||||
reverse for light one):
|
||||
|
||||
- Four shades of "colored" greys for general UI. In 256 colors they are
|
||||
exact greys; in true colors they are shades of "cold" grey.
|
||||
|
||||
- Dark ones (from darkest to lightest) are reserved as background for
|
||||
|hl-NormalFloat| (considered as "black"), |hl-Normal| (background),
|
||||
|hl-CursorLine|, |hl-Visual|.
|
||||
|
||||
- Light ones (also from darkest to lightest) are reserved for
|
||||
`Comment`, |hl-StatusLine|/|hl-TabLine|, |hl-Normal| (foreground),
|
||||
and color considered as "white".
|
||||
|
||||
- Six colors to provide enough terminal colors: red, yellow, green, cyan,
|
||||
blue, magenta.
|
||||
They should have (reasonably) similar lightness and chroma to make them
|
||||
visually coherent. Lightness should be as equal to the palette's basic grey
|
||||
(which is used for |hl-Normal|) as possible. They should have (reasonably)
|
||||
different hues to make them visually separable.
|
||||
|
||||
- Each palette color should have a 256 colors variant with closest color
|
||||
computed based on the perceptually uniform distance measure.
|
||||
|
||||
|
||||
==============================================================================
|
||||
Highlight groups
|
||||
|
||||
Use:
|
||||
|
||||
- Grey shades for general UI according to their design.
|
||||
|
||||
- Bold text for keywords (`Statement` highlight group). This is an important
|
||||
choice to increase accessibility for people with color deficiencies, as it
|
||||
doesn't rely on actual color.
|
||||
|
||||
- Green for strings, |hl-DiffAdd| (as background), |hl-DiagnosticOk|, and some
|
||||
minor text UI elements.
|
||||
|
||||
- Cyan as main syntax color, i.e. for function usage (`Function` highlight
|
||||
group), |hl-DiffText|, |hl-DiagnosticInfo|, and some minor text UI elements.
|
||||
|
||||
- Red to generally mean high user attention, i.e. errors; in particular for
|
||||
|hl-ErrorMsg|, |hl-DiffDelete|, |hl-DiagnosticError|.
|
||||
|
||||
- Yellow very sparingly only with true colors to mean mild user attention,
|
||||
i.e. warnings. That is, |hl-DiagnosticWarn| and |hl-WarningMsg|.
|
||||
|
||||
- Blue very sparingly only with true colors as |hl-DiagnosticHint| and some
|
||||
additional important syntax group (like `Identifier`).
|
||||
|
||||
- Magenta very carefully (if at all).
|
||||
|
||||
|
||||
vim:tw=78:ts=8:et:ft=help:norl:
|
@ -95,6 +95,9 @@ The following changes may require adaptations in user config or plugins.
|
||||
• Legacy and extmark signs are displayed and listed with the same priority:
|
||||
line number -> priority -> sign id -> recently placed
|
||||
|
||||
• Default color scheme has been updated to be "Neovim branded" and accessible.
|
||||
Use `:colorscheme vim` to revert to the old legacy color scheme.
|
||||
|
||||
==============================================================================
|
||||
BREAKING CHANGES IN HEAD *news-breaking-dev*
|
||||
|
||||
|
@ -30,6 +30,8 @@ Defaults *nvim-defaults*
|
||||
":filetype off" to |init.vim|.
|
||||
- Syntax highlighting is enabled by default. This can be disabled by adding
|
||||
":syntax off" to |init.vim|.
|
||||
- Default color scheme has been updated. This can be reversed by adding
|
||||
":colorscheme vim" to |init.vim|.
|
||||
|
||||
- 'autoindent' is enabled
|
||||
- 'autoread' is enabled (works in all UIs, including terminal)
|
||||
|
@ -135,263 +135,321 @@ static const char e_missing_argument_str[]
|
||||
// they still work when the runtime files can't be found.
|
||||
|
||||
static const char *highlight_init_both[] = {
|
||||
"Conceal ctermbg=DarkGrey ctermfg=LightGrey guibg=DarkGrey guifg=LightGrey",
|
||||
"Cursor guibg=fg guifg=bg",
|
||||
"lCursor guibg=fg guifg=bg",
|
||||
"DiffText cterm=bold ctermbg=Red gui=bold guibg=Red",
|
||||
"ErrorMsg ctermbg=DarkRed ctermfg=White guibg=Red guifg=White",
|
||||
"IncSearch cterm=reverse gui=reverse",
|
||||
"ModeMsg cterm=bold gui=bold",
|
||||
"NonText ctermfg=Blue gui=bold guifg=Blue",
|
||||
"Normal cterm=NONE gui=NONE",
|
||||
"PmenuSbar ctermbg=Grey guibg=Grey",
|
||||
"StatusLine cterm=reverse,bold gui=reverse,bold",
|
||||
"StatusLineNC cterm=reverse gui=reverse",
|
||||
"TabLineFill cterm=reverse gui=reverse",
|
||||
"TabLineSel cterm=bold gui=bold",
|
||||
"TermCursor cterm=reverse gui=reverse",
|
||||
"WinBar cterm=bold gui=bold",
|
||||
"WildMenu ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black",
|
||||
"default link VertSplit Normal",
|
||||
"default link WinSeparator VertSplit",
|
||||
"default link WinBarNC WinBar",
|
||||
"default link EndOfBuffer NonText",
|
||||
"default link LineNrAbove LineNr",
|
||||
"default link LineNrBelow LineNr",
|
||||
"default link QuickFixLine Search",
|
||||
"default link CursorLineSign SignColumn",
|
||||
"Cursor guibg=fg guifg=bg",
|
||||
"CursorLineNr gui=bold cterm=bold",
|
||||
"QuickFixLine gui=bold cterm=bold",
|
||||
"RedrawDebugNormal gui=reverse cterm=reverse",
|
||||
"TabLineSel gui=bold cterm=bold",
|
||||
"TermCursor gui=reverse cterm=reverse",
|
||||
"Title gui=bold cterm=bold",
|
||||
"Underlined gui=underline cterm=underline",
|
||||
"lCursor guibg=fg guifg=bg",
|
||||
|
||||
// UI
|
||||
"default link CurSearch Search",
|
||||
"default link CursorIM Cursor",
|
||||
"default link CursorLineFold FoldColumn",
|
||||
"default link CurSearch Search",
|
||||
"default link PmenuKind Pmenu",
|
||||
"default link PmenuKindSel PmenuSel",
|
||||
"default link PmenuExtra Pmenu",
|
||||
"default link PmenuExtraSel PmenuSel",
|
||||
"default link Substitute Search",
|
||||
"default link Whitespace NonText",
|
||||
"default link MsgSeparator StatusLine",
|
||||
"default link NormalFloat Pmenu",
|
||||
"default link FloatBorder WinSeparator",
|
||||
"default link FloatTitle Title",
|
||||
"default link FloatFooter Title",
|
||||
"default FloatShadow blend=80 guibg=Black",
|
||||
"default FloatShadowThrough blend=100 guibg=Black",
|
||||
"RedrawDebugNormal cterm=reverse gui=reverse",
|
||||
"RedrawDebugClear ctermbg=Yellow guibg=Yellow",
|
||||
"RedrawDebugComposed ctermbg=Green guibg=Green",
|
||||
"RedrawDebugRecompose ctermbg=Red guibg=Red",
|
||||
"Error term=reverse cterm=NONE ctermfg=White ctermbg=Red gui=NONE guifg=White guibg=Red",
|
||||
"Todo term=standout cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Blue guibg=Yellow",
|
||||
"default link String Constant",
|
||||
"default link Character Constant",
|
||||
"default link Number Constant",
|
||||
"default link Boolean Constant",
|
||||
"default link Float Number",
|
||||
"default link Function Identifier",
|
||||
"default link Conditional Statement",
|
||||
"default link Repeat Statement",
|
||||
"default link Label Statement",
|
||||
"default link Operator Statement",
|
||||
"default link Keyword Statement",
|
||||
"default link Exception Statement",
|
||||
"default link Include PreProc",
|
||||
"default link Define PreProc",
|
||||
"default link Macro PreProc",
|
||||
"default link PreCondit PreProc",
|
||||
"default link StorageClass Type",
|
||||
"default link Structure Type",
|
||||
"default link Typedef Type",
|
||||
"default link Tag Special",
|
||||
"default link SpecialChar Special",
|
||||
"default link Delimiter Special",
|
||||
"default link CursorLineSign SignColumn",
|
||||
"default link EndOfBuffer NonText",
|
||||
"default link FloatBorder NormalFloat",
|
||||
"default link FloatFooter Title",
|
||||
"default link FloatTitle Title",
|
||||
"default link FoldColumn SignColumn",
|
||||
"default link IncSearch Search",
|
||||
"default link LineNrAbove LineNr",
|
||||
"default link LineNrBelow LineNr",
|
||||
"default link MsgSeparator StatusLine",
|
||||
"default link MsgArea NONE",
|
||||
"default link NormalNC NONE",
|
||||
"default link PmenuExtra Pmenu",
|
||||
"default link PmenuExtraSel PmenuSel",
|
||||
"default link PmenuKind Pmenu",
|
||||
"default link PmenuKindSel PmenuSel",
|
||||
"default link PmenuSbar Pmenu",
|
||||
"default link Substitute Search",
|
||||
"default link TabLineFill TabLine",
|
||||
"default link TermCursorNC NONE",
|
||||
"default link VertSplit WinSeparator",
|
||||
"default link VisualNOS Visual",
|
||||
"default link Whitespace NonText",
|
||||
"default link WildMenu PmenuSel",
|
||||
"default link WinBar StatusLine",
|
||||
"default link WinBarNC StatusLineNC",
|
||||
"default link WinSeparator Normal",
|
||||
|
||||
// Syntax
|
||||
"default link Character Constant",
|
||||
"default link Number Constant",
|
||||
"default link Boolean Constant",
|
||||
"default link Float Number",
|
||||
"default link Conditional Statement",
|
||||
"default link Repeat Statement",
|
||||
"default link Label Statement",
|
||||
"default link Keyword Statement",
|
||||
"default link Exception Statement",
|
||||
"default link Include PreProc",
|
||||
"default link Define PreProc",
|
||||
"default link Macro PreProc",
|
||||
"default link PreCondit PreProc",
|
||||
"default link StorageClass Type",
|
||||
"default link Structure Type",
|
||||
"default link Typedef Type",
|
||||
"default link Tag Special",
|
||||
"default link SpecialChar Special",
|
||||
"default link SpecialComment Special",
|
||||
"default link Debug Special",
|
||||
"default DiagnosticError ctermfg=1 guifg=Red",
|
||||
"default DiagnosticWarn ctermfg=3 guifg=Orange",
|
||||
"default DiagnosticInfo ctermfg=4 guifg=LightBlue",
|
||||
"default DiagnosticHint ctermfg=7 guifg=LightGrey",
|
||||
"default DiagnosticOk ctermfg=10 guifg=LightGreen",
|
||||
"default DiagnosticUnderlineError cterm=underline gui=underline guisp=Red",
|
||||
"default DiagnosticUnderlineWarn cterm=underline gui=underline guisp=Orange",
|
||||
"default DiagnosticUnderlineInfo cterm=underline gui=underline guisp=LightBlue",
|
||||
"default DiagnosticUnderlineHint cterm=underline gui=underline guisp=LightGrey",
|
||||
"default DiagnosticUnderlineOk cterm=underline gui=underline guisp=LightGreen",
|
||||
"default link DiagnosticVirtualTextError DiagnosticError",
|
||||
"default link DiagnosticVirtualTextWarn DiagnosticWarn",
|
||||
"default link DiagnosticVirtualTextInfo DiagnosticInfo",
|
||||
"default link DiagnosticVirtualTextHint DiagnosticHint",
|
||||
"default link DiagnosticVirtualTextOk DiagnosticOk",
|
||||
"default link DiagnosticFloatingError DiagnosticError",
|
||||
"default link DiagnosticFloatingWarn DiagnosticWarn",
|
||||
"default link DiagnosticFloatingInfo DiagnosticInfo",
|
||||
"default link DiagnosticFloatingHint DiagnosticHint",
|
||||
"default link DiagnosticFloatingOk DiagnosticOk",
|
||||
"default link DiagnosticSignError DiagnosticError",
|
||||
"default link DiagnosticSignWarn DiagnosticWarn",
|
||||
"default link DiagnosticSignInfo DiagnosticInfo",
|
||||
"default link DiagnosticSignHint DiagnosticHint",
|
||||
"default link DiagnosticSignOk DiagnosticOk",
|
||||
"default DiagnosticDeprecated cterm=strikethrough gui=strikethrough guisp=Red",
|
||||
"default link DiagnosticUnnecessary Comment",
|
||||
"default link LspInlayHint NonText",
|
||||
"default link Debug Special",
|
||||
"default link Ignore Normal",
|
||||
"default link LspInlayHint NonText",
|
||||
"default link SnippetTabstop Visual",
|
||||
|
||||
// Diagnostic
|
||||
"default link DiagnosticVirtualTextError DiagnosticError",
|
||||
"default link DiagnosticVirtualTextWarn DiagnosticWarn",
|
||||
"default link DiagnosticVirtualTextInfo DiagnosticInfo",
|
||||
"default link DiagnosticVirtualTextHint DiagnosticHint",
|
||||
"default link DiagnosticVirtualTextOk DiagnosticOk",
|
||||
"default link DiagnosticSignError DiagnosticError",
|
||||
"default link DiagnosticSignWarn DiagnosticWarn",
|
||||
"default link DiagnosticSignInfo DiagnosticInfo",
|
||||
"default link DiagnosticSignHint DiagnosticHint",
|
||||
"default link DiagnosticSignOk DiagnosticOk",
|
||||
"default link DiagnosticUnnecessary Comment",
|
||||
|
||||
// Text
|
||||
"default link @text.literal Comment",
|
||||
"default link @text.literal Comment",
|
||||
"default link @text.reference Identifier",
|
||||
"default link @text.title Title",
|
||||
"default link @text.uri Underlined",
|
||||
"default link @text.title Title",
|
||||
"default link @text.uri Underlined",
|
||||
"default link @text.underline Underlined",
|
||||
"default link @text.todo Todo",
|
||||
"default link @text.todo Todo",
|
||||
|
||||
// Miscs
|
||||
"default link @comment Comment",
|
||||
"default link @comment Comment",
|
||||
"default link @punctuation Delimiter",
|
||||
|
||||
// Constants
|
||||
"default link @constant Constant",
|
||||
"default link @constant.builtin Special",
|
||||
"default link @constant.macro Define",
|
||||
"default link @define Define",
|
||||
"default link @macro Macro",
|
||||
"default link @string String",
|
||||
"default link @string.escape SpecialChar",
|
||||
"default link @string.special SpecialChar",
|
||||
"default link @character Character",
|
||||
"default link @constant Constant",
|
||||
"default link @constant.builtin Special",
|
||||
"default link @constant.macro Define",
|
||||
"default link @define Define",
|
||||
"default link @macro Macro",
|
||||
"default link @string String",
|
||||
"default link @string.escape SpecialChar",
|
||||
"default link @string.special SpecialChar",
|
||||
"default link @character Character",
|
||||
"default link @character.special SpecialChar",
|
||||
"default link @number Number",
|
||||
"default link @boolean Boolean",
|
||||
"default link @float Float",
|
||||
"default link @number Number",
|
||||
"default link @boolean Boolean",
|
||||
"default link @float Float",
|
||||
|
||||
// Functions
|
||||
"default link @function Function",
|
||||
"default link @function Function",
|
||||
"default link @function.builtin Special",
|
||||
"default link @function.macro Macro",
|
||||
"default link @parameter Identifier",
|
||||
"default link @method Function",
|
||||
"default link @field Identifier",
|
||||
"default link @property Identifier",
|
||||
"default link @constructor Special",
|
||||
"default link @function.macro Macro",
|
||||
"default link @parameter Identifier",
|
||||
"default link @method Function",
|
||||
"default link @field Identifier",
|
||||
"default link @property Identifier",
|
||||
"default link @constructor Special",
|
||||
|
||||
// Keywords
|
||||
"default link @conditional Conditional",
|
||||
"default link @repeat Repeat",
|
||||
"default link @label Label",
|
||||
"default link @operator Operator",
|
||||
"default link @keyword Keyword",
|
||||
"default link @exception Exception",
|
||||
"default link @repeat Repeat",
|
||||
"default link @label Label",
|
||||
"default link @operator Operator",
|
||||
"default link @keyword Keyword",
|
||||
"default link @exception Exception",
|
||||
|
||||
"default link @variable Identifier",
|
||||
"default link @type Type",
|
||||
"default link @variable NONE", // don't highlight to reduce visual overload
|
||||
"default link @type Type",
|
||||
"default link @type.definition Typedef",
|
||||
"default link @storageclass StorageClass",
|
||||
"default link @namespace Identifier",
|
||||
"default link @include Include",
|
||||
"default link @preproc PreProc",
|
||||
"default link @debug Debug",
|
||||
"default link @tag Tag",
|
||||
"default link @storageclass StorageClass",
|
||||
"default link @namespace Identifier",
|
||||
"default link @include Include",
|
||||
"default link @preproc PreProc",
|
||||
"default link @debug Debug",
|
||||
"default link @tag Tag",
|
||||
|
||||
// LSP semantic tokens
|
||||
"default link @lsp.type.class Structure",
|
||||
"default link @lsp.type.comment Comment",
|
||||
"default link @lsp.type.decorator Function",
|
||||
"default link @lsp.type.enum Structure",
|
||||
"default link @lsp.type.enumMember Constant",
|
||||
"default link @lsp.type.function Function",
|
||||
"default link @lsp.type.interface Structure",
|
||||
"default link @lsp.type.macro Macro",
|
||||
"default link @lsp.type.method Function",
|
||||
"default link @lsp.type.namespace Structure",
|
||||
"default link @lsp.type.parameter Identifier",
|
||||
"default link @lsp.type.property Identifier",
|
||||
"default link @lsp.type.struct Structure",
|
||||
"default link @lsp.type.type Type",
|
||||
"default link @lsp.type.class Structure",
|
||||
"default link @lsp.type.comment Comment",
|
||||
"default link @lsp.type.decorator Function",
|
||||
"default link @lsp.type.enum Structure",
|
||||
"default link @lsp.type.enumMember Constant",
|
||||
"default link @lsp.type.function Function",
|
||||
"default link @lsp.type.interface Structure",
|
||||
"default link @lsp.type.macro Macro",
|
||||
"default link @lsp.type.method Function",
|
||||
"default link @lsp.type.namespace Structure",
|
||||
"default link @lsp.type.parameter Identifier",
|
||||
"default link @lsp.type.property Identifier",
|
||||
"default link @lsp.type.struct Structure",
|
||||
"default link @lsp.type.type Type",
|
||||
"default link @lsp.type.typeParameter TypeDef",
|
||||
"default link @lsp.type.variable Identifier",
|
||||
"default link @lsp.type.variable NONE", // don't highlight to reduce visual overload
|
||||
|
||||
NULL
|
||||
};
|
||||
|
||||
// Default colors only used with a light background.
|
||||
static const char *highlight_init_light[] = {
|
||||
"ColorColumn ctermbg=LightRed guibg=LightRed",
|
||||
"CursorColumn ctermbg=LightGrey guibg=Grey90",
|
||||
"CursorLine cterm=underline guibg=Grey90",
|
||||
"CursorLineNr cterm=underline ctermfg=Brown gui=bold guifg=Brown",
|
||||
"DiffAdd ctermbg=LightBlue guibg=LightBlue",
|
||||
"DiffChange ctermbg=LightMagenta guibg=LightMagenta",
|
||||
"DiffDelete ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan",
|
||||
"Directory ctermfg=DarkBlue guifg=Blue",
|
||||
"FoldColumn ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue",
|
||||
"Folded ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue",
|
||||
"LineNr ctermfg=Brown guifg=Brown",
|
||||
"MatchParen ctermbg=Cyan guibg=Cyan",
|
||||
"MoreMsg ctermfg=DarkGreen gui=bold guifg=SeaGreen",
|
||||
"Pmenu ctermbg=LightMagenta ctermfg=Black guibg=LightMagenta",
|
||||
"PmenuSel ctermbg=LightGrey ctermfg=Black guibg=Grey",
|
||||
"PmenuThumb ctermbg=Black guibg=Black",
|
||||
"Question ctermfg=DarkGreen gui=bold guifg=SeaGreen",
|
||||
"Search ctermbg=Yellow ctermfg=NONE guibg=Yellow guifg=NONE",
|
||||
"SignColumn ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue",
|
||||
"SpecialKey ctermfg=DarkBlue guifg=Blue",
|
||||
"SpellBad ctermbg=LightRed guisp=Red gui=undercurl",
|
||||
"SpellCap ctermbg=LightBlue guisp=Blue gui=undercurl",
|
||||
"SpellLocal ctermbg=Cyan guisp=DarkCyan gui=undercurl",
|
||||
"SpellRare ctermbg=LightMagenta guisp=Magenta gui=undercurl",
|
||||
"TabLine cterm=underline ctermfg=black ctermbg=LightGrey gui=underline guibg=LightGrey",
|
||||
"Title ctermfg=DarkMagenta gui=bold guifg=Magenta",
|
||||
"Visual guibg=LightGrey",
|
||||
"WarningMsg ctermfg=DarkRed guifg=Red",
|
||||
"Comment term=bold cterm=NONE ctermfg=DarkBlue ctermbg=NONE gui=NONE guifg=Blue guibg=NONE",
|
||||
"Constant term=underline cterm=NONE ctermfg=DarkRed ctermbg=NONE gui=NONE guifg=Magenta guibg=NONE",
|
||||
"Special term=bold cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=#6a5acd guibg=NONE",
|
||||
"Identifier term=underline cterm=NONE ctermfg=DarkCyan ctermbg=NONE gui=NONE guifg=DarkCyan guibg=NONE",
|
||||
"Statement term=bold cterm=NONE ctermfg=Brown ctermbg=NONE gui=bold guifg=Brown guibg=NONE",
|
||||
"PreProc term=underline cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=#6a0dad guibg=NONE",
|
||||
"Type term=underline cterm=NONE ctermfg=DarkGreen ctermbg=NONE gui=bold guifg=SeaGreen guibg=NONE",
|
||||
"Underlined term=underline cterm=underline ctermfg=DarkMagenta gui=underline guifg=SlateBlue",
|
||||
"Ignore term=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg guibg=NONE",
|
||||
"Normal guifg=NvimDarkGrey2 ctermfg=234 guibg=NvimLightGrey2 ctermbg=253",
|
||||
|
||||
// UI
|
||||
"ColorColumn guibg=NvimLightGrey4 ctermbg=247",
|
||||
"Conceal guifg=NvimLightGrey4 ctermfg=247",
|
||||
"CursorColumn guibg=NvimLightGrey3 ctermbg=251",
|
||||
"CursorLine guibg=NvimLightGrey3 ctermbg=251",
|
||||
"DiffAdd guifg=NvimDarkGrey1 ctermfg=232 guibg=NvimLightGreen ctermbg=158",
|
||||
"DiffChange guifg=NvimDarkGrey1 ctermfg=232 guibg=NvimLightGrey4 ctermbg=247",
|
||||
"DiffDelete guifg=NvimDarkRed ctermfg=52 gui=bold cterm=bold",
|
||||
"DiffText guifg=NvimDarkGrey1 ctermfg=232 guibg=NvimLightCyan ctermbg=123",
|
||||
"Directory guifg=NvimDarkCyan ctermfg=30",
|
||||
"ErrorMsg guifg=NvimDarkRed ctermfg=52",
|
||||
"FloatShadow guibg=NvimLightGrey1 ctermbg=255 blend=80",
|
||||
"FloatShadowThrough guibg=NvimLightGrey1 ctermbg=255 blend=100",
|
||||
"Folded guifg=NvimDarkGrey4 ctermfg=239 guibg=NvimLightGrey3 ctermbg=251",
|
||||
"LineNr guifg=NvimLightGrey4 ctermfg=247",
|
||||
"MatchParen guibg=NvimLightGrey4 ctermbg=247 gui=bold cterm=bold",
|
||||
"ModeMsg guifg=NvimDarkGreen ctermfg=22",
|
||||
"MoreMsg guifg=NvimDarkCyan ctermfg=30",
|
||||
"NonText guifg=NvimLightGrey4 ctermfg=247",
|
||||
"NormalFloat guifg=NvimDarkGrey2 ctermfg=234 guibg=NvimLightGrey1 ctermbg=255",
|
||||
"Pmenu guifg=NvimDarkGrey2 ctermfg=234 guibg=NvimLightGrey3 ctermbg=251",
|
||||
"PmenuSel guifg=NvimLightGrey3 ctermfg=251 guibg=NvimDarkGrey2 ctermbg=234 blend=0",
|
||||
"PmenuThumb guibg=NvimLightGrey4 ctermbg=247",
|
||||
"Question guifg=NvimDarkCyan ctermfg=30",
|
||||
"RedrawDebugClear guibg=NvimLightCyan ctermbg=123",
|
||||
"RedrawDebugComposed guibg=NvimLightGreen ctermbg=158",
|
||||
"RedrawDebugRecompose guibg=NvimLightRed ctermbg=217",
|
||||
"Search guifg=NvimDarkGrey1 ctermfg=232 guibg=NvimLightYellow ctermbg=222",
|
||||
"SignColumn guifg=NvimLightGrey4 ctermfg=247",
|
||||
"SpecialKey guifg=NvimLightGrey4 ctermfg=247",
|
||||
"SpellBad guisp=NvimDarkRed gui=undercurl cterm=undercurl",
|
||||
"SpellCap guisp=NvimDarkYellow gui=undercurl cterm=undercurl",
|
||||
"SpellLocal guisp=NvimDarkGreen gui=undercurl cterm=undercurl",
|
||||
"SpellRare guisp=NvimDarkCyan gui=undercurl cterm=undercurl",
|
||||
"StatusLine guifg=NvimDarkGrey3 ctermfg=236 guibg=NvimLightGrey1 ctermbg=255",
|
||||
"StatusLineNC guifg=NvimDarkGrey4 ctermfg=239 guibg=NvimLightGrey1 ctermbg=255",
|
||||
"TabLine guifg=NvimDarkGrey3 ctermfg=236 guibg=NvimLightGrey1 ctermbg=255",
|
||||
"Visual guibg=NvimLightGrey4 ctermbg=247",
|
||||
"WarningMsg guifg=NvimDarkYellow ctermfg=52", // In 256 colors fall back to red
|
||||
|
||||
// Syntax
|
||||
"Comment guifg=NvimDarkGrey4 ctermfg=239",
|
||||
"Constant guifg=NvimDarkGrey2 ctermfg=234",
|
||||
"String guifg=NvimDarkGreen ctermfg=22",
|
||||
"Identifier guifg=NvimDarkBlue ctermfg=NONE", // No fallback in 256 colors to reduce noise
|
||||
"Function guifg=NvimDarkCyan ctermfg=30",
|
||||
"Statement guifg=NvimDarkGrey2 ctermfg=234 gui=bold cterm=bold",
|
||||
"Operator guifg=NvimDarkGrey2 ctermfg=234",
|
||||
"PreProc guifg=NvimDarkGrey2 ctermfg=234",
|
||||
"Type guifg=NvimDarkGrey2 ctermfg=234",
|
||||
"Special guifg=NvimDarkGrey2 ctermfg=234",
|
||||
"Delimiter guifg=NvimDarkGrey2 ctermfg=234",
|
||||
"Error guifg=NvimDarkGrey1 ctermfg=232 guibg=NvimLightRed ctermbg=217",
|
||||
"Todo guifg=NvimDarkGrey1 ctermfg=232 gui=bold cterm=bold",
|
||||
|
||||
// Diagnostic
|
||||
"DiagnosticError guifg=NvimDarkRed ctermfg=52",
|
||||
"DiagnosticWarn guifg=NvimDarkYellow ctermfg=52", // In 256 colors fall back to red
|
||||
"DiagnosticInfo guifg=NvimDarkCyan ctermfg=30",
|
||||
"DiagnosticHint guifg=NvimDarkBlue ctermfg=30", // In 256 colors fall back to cyan
|
||||
"DiagnosticOk guifg=NvimDarkGreen ctermfg=22",
|
||||
"DiagnosticUnderlineError guisp=NvimDarkRed gui=underline cterm=underline",
|
||||
"DiagnosticUnderlineWarn guisp=NvimDarkYellow gui=underline cterm=underline",
|
||||
"DiagnosticUnderlineInfo guisp=NvimDarkCyan gui=underline cterm=underline",
|
||||
"DiagnosticUnderlineHint guisp=NvimDarkBlue gui=underline cterm=underline", // In 256 colors fall back to cyan
|
||||
"DiagnosticUnderlineOk guisp=NvimDarkGreen gui=underline cterm=underline",
|
||||
"DiagnosticFloatingError guifg=NvimDarkRed ctermfg=52 guibg=NvimLightGrey1 ctermbg=255",
|
||||
// In 256 colors fall back to red
|
||||
"DiagnosticFloatingWarn guifg=NvimDarkYellow ctermfg=52 guibg=NvimLightGrey1 ctermbg=255",
|
||||
"DiagnosticFloatingInfo guifg=NvimDarkCyan ctermfg=30 guibg=NvimLightGrey1 ctermbg=255",
|
||||
// In 256 colors fall back to cyan
|
||||
"DiagnosticFloatingHint guifg=NvimDarkBlue ctermfg=30 guibg=NvimLightGrey1 ctermbg=255",
|
||||
"DiagnosticFloatingOk guifg=NvimDarkGreen ctermfg=22 guibg=NvimLightGrey1 ctermbg=255",
|
||||
"DiagnosticDeprecated guisp=NvimDarkRed gui=strikethrough cterm=strikethrough",
|
||||
NULL
|
||||
};
|
||||
|
||||
// Default colors only used with a dark background.
|
||||
static const char *highlight_init_dark[] = {
|
||||
"ColorColumn ctermbg=DarkRed guibg=DarkRed",
|
||||
"CursorColumn ctermbg=DarkGrey guibg=Grey40",
|
||||
"CursorLine cterm=underline guibg=Grey40",
|
||||
"CursorLineNr cterm=underline ctermfg=Yellow gui=bold guifg=Yellow",
|
||||
"DiffAdd ctermbg=DarkBlue guibg=DarkBlue",
|
||||
"DiffChange ctermbg=DarkMagenta guibg=DarkMagenta",
|
||||
"DiffDelete ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan",
|
||||
"Directory ctermfg=LightCyan guifg=Cyan",
|
||||
"FoldColumn ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan",
|
||||
"Folded ctermbg=DarkGrey ctermfg=Cyan guibg=DarkGrey guifg=Cyan",
|
||||
"LineNr ctermfg=Yellow guifg=Yellow",
|
||||
"MatchParen ctermbg=DarkCyan guibg=DarkCyan",
|
||||
"MoreMsg ctermfg=LightGreen gui=bold guifg=SeaGreen",
|
||||
"Pmenu ctermbg=Magenta ctermfg=Black guibg=Magenta",
|
||||
"PmenuSel ctermbg=Black ctermfg=DarkGrey guibg=DarkGrey",
|
||||
"PmenuThumb ctermbg=White guibg=White",
|
||||
"Question ctermfg=LightGreen gui=bold guifg=Green",
|
||||
"Search ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black",
|
||||
"SignColumn ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan",
|
||||
"SpecialKey ctermfg=LightBlue guifg=Cyan",
|
||||
"SpellBad ctermbg=Red guisp=Red gui=undercurl",
|
||||
"SpellCap ctermbg=Blue guisp=Blue gui=undercurl",
|
||||
"SpellLocal ctermbg=Cyan guisp=Cyan gui=undercurl",
|
||||
"SpellRare ctermbg=Magenta guisp=Magenta gui=undercurl",
|
||||
"TabLine cterm=underline ctermfg=white ctermbg=DarkGrey gui=underline guibg=DarkGrey",
|
||||
"Title ctermfg=LightMagenta gui=bold guifg=Magenta",
|
||||
"Visual guibg=DarkGrey",
|
||||
"WarningMsg ctermfg=LightRed guifg=Red",
|
||||
"Comment term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#80a0ff guibg=NONE",
|
||||
"Constant term=underline cterm=NONE ctermfg=Magenta ctermbg=NONE gui=NONE guifg=#ffa0a0 guibg=NONE",
|
||||
"Special term=bold cterm=NONE ctermfg=LightRed ctermbg=NONE gui=NONE guifg=Orange guibg=NONE",
|
||||
"Identifier term=underline cterm=bold ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#40ffff guibg=NONE",
|
||||
"Statement term=bold cterm=NONE ctermfg=Yellow ctermbg=NONE gui=bold guifg=#ffff60 guibg=NONE",
|
||||
"PreProc term=underline cterm=NONE ctermfg=LightBlue ctermbg=NONE gui=NONE guifg=#ff80ff guibg=NONE",
|
||||
"Type term=underline cterm=NONE ctermfg=LightGreen ctermbg=NONE gui=bold guifg=#60ff60 guibg=NONE",
|
||||
"Underlined term=underline cterm=underline ctermfg=LightBlue gui=underline guifg=#80a0ff",
|
||||
"Ignore term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg guibg=NONE",
|
||||
"Normal guifg=NvimLightGrey2 ctermfg=253 guibg=NvimDarkGrey2 ctermbg=234",
|
||||
|
||||
// UI
|
||||
"ColorColumn guibg=NvimDarkGrey4 ctermbg=239",
|
||||
"Conceal guifg=NvimDarkGrey4 ctermfg=239",
|
||||
"CursorColumn guibg=NvimDarkGrey3 ctermbg=236",
|
||||
"CursorLine guibg=NvimDarkGrey3 ctermbg=236",
|
||||
"DiffAdd guifg=NvimLightGrey1 ctermfg=255 guibg=NvimDarkGreen ctermbg=22",
|
||||
"DiffChange guifg=NvimLightGrey1 ctermfg=255 guibg=NvimDarkGrey4 ctermbg=239",
|
||||
"DiffDelete guifg=NvimLightRed ctermfg=217 gui=bold cterm=bold",
|
||||
"DiffText guifg=NvimLightGrey1 ctermfg=255 guibg=NvimDarkCyan ctermbg=30",
|
||||
"Directory guifg=NvimLightCyan ctermfg=123",
|
||||
"ErrorMsg guifg=NvimLightRed ctermfg=217",
|
||||
"FloatShadow guibg=NvimDarkGrey1 ctermbg=232 blend=80",
|
||||
"FloatShadowThrough guibg=NvimDarkGrey1 ctermbg=232 blend=100",
|
||||
"Folded guifg=NvimLightGrey4 ctermfg=247 guibg=NvimDarkGrey3 ctermbg=236",
|
||||
"LineNr guifg=NvimDarkGrey4 ctermfg=239",
|
||||
"MatchParen guibg=NvimDarkGrey4 ctermbg=239 gui=bold cterm=bold",
|
||||
"ModeMsg guifg=NvimLightGreen ctermfg=158",
|
||||
"MoreMsg guifg=NvimLightCyan ctermfg=123",
|
||||
"NonText guifg=NvimDarkGrey4 ctermfg=239",
|
||||
"NormalFloat guifg=NvimLightGrey2 ctermfg=253 guibg=NvimDarkGrey1 ctermbg=232",
|
||||
"Pmenu guifg=NvimLightGrey2 ctermfg=253 guibg=NvimDarkGrey3 ctermbg=236",
|
||||
"PmenuSel guifg=NvimDarkGrey3 ctermfg=236 guibg=NvimLightGrey2 ctermbg=253 blend=0",
|
||||
"PmenuThumb guibg=NvimDarkGrey4 ctermbg=239",
|
||||
"Question guifg=NvimLightCyan ctermfg=123",
|
||||
"RedrawDebugClear guibg=NvimDarkCyan ctermbg=30",
|
||||
"RedrawDebugComposed guibg=NvimDarkGreen ctermbg=22",
|
||||
"RedrawDebugRecompose guibg=NvimDarkRed ctermbg=52",
|
||||
"Search guifg=NvimLightGrey1 ctermfg=255 guibg=NvimDarkYellow ctermbg=58",
|
||||
"SignColumn guifg=NvimDarkGrey4 ctermfg=239",
|
||||
"SpecialKey guifg=NvimDarkGrey4 ctermfg=239",
|
||||
"SpellBad guisp=NvimLightRed gui=undercurl cterm=undercurl",
|
||||
"SpellCap guisp=NvimLightYellow gui=undercurl cterm=undercurl",
|
||||
"SpellLocal guisp=NvimLightGreen gui=undercurl cterm=undercurl",
|
||||
"SpellRare guisp=NvimLightCyan gui=undercurl cterm=undercurl",
|
||||
"StatusLine guifg=NvimLightGrey3 ctermfg=251 guibg=NvimDarkGrey1 ctermbg=232",
|
||||
"StatusLineNC guifg=NvimLightGrey4 ctermfg=247 guibg=NvimDarkGrey1 ctermbg=232",
|
||||
"TabLine guifg=NvimLightGrey3 ctermfg=251 guibg=NvimDarkGrey1 ctermbg=232",
|
||||
"Visual guibg=NvimDarkGrey4 ctermbg=239",
|
||||
"WarningMsg guifg=NvimLightYellow ctermfg=217", // In 256 colors fall back to red
|
||||
|
||||
// Syntax
|
||||
"Comment guifg=NvimLightGrey4 ctermfg=247",
|
||||
"Constant guifg=NvimLightGrey2 ctermfg=253",
|
||||
"String guifg=NvimLightGreen ctermfg=158",
|
||||
"Identifier guifg=NvimLightBlue ctermfg=NONE", // No fallback in 256 colors to reduce noise
|
||||
"Function guifg=NvimLightCyan ctermfg=123",
|
||||
"Statement guifg=NvimLightGrey2 ctermfg=253 gui=bold cterm=bold",
|
||||
"Operator guifg=NvimLightGrey2 ctermfg=253",
|
||||
"PreProc guifg=NvimLightGrey2 ctermfg=253",
|
||||
"Type guifg=NvimLightGrey2 ctermfg=253",
|
||||
"Special guifg=NvimLightGrey2 ctermfg=253",
|
||||
"Delimiter guifg=NvimLightGrey2 ctermfg=253",
|
||||
"Error guifg=NvimLightGrey1 ctermfg=255 guibg=NvimDarkRed ctermbg=52",
|
||||
"Todo guifg=NvimLightGrey1 ctermfg=255 gui=bold cterm=bold",
|
||||
|
||||
// Diagnostic
|
||||
"DiagnosticError guifg=NvimLightRed ctermfg=217",
|
||||
"DiagnosticWarn guifg=NvimLightYellow ctermfg=217", // In 256 colors fall back to red
|
||||
"DiagnosticInfo guifg=NvimLightCyan ctermfg=123",
|
||||
"DiagnosticHint guifg=NvimLightBlue ctermfg=123", // In 256 colors fall back to cyan
|
||||
"DiagnosticOk guifg=NvimLightGreen ctermfg=158",
|
||||
"DiagnosticUnderlineError guisp=NvimLightRed gui=underline cterm=underline",
|
||||
"DiagnosticUnderlineWarn guisp=NvimLightYellow gui=underline cterm=underline", // In 256 colors fall back to red
|
||||
"DiagnosticUnderlineInfo guisp=NvimLightCyan gui=underline cterm=underline",
|
||||
"DiagnosticUnderlineHint guisp=NvimLightBlue gui=underline cterm=underline",
|
||||
"DiagnosticUnderlineOk guisp=NvimLightGreen gui=underline cterm=underline",
|
||||
"DiagnosticFloatingError guifg=NvimLightRed ctermfg=217 guibg=NvimDarkGrey1 ctermbg=232",
|
||||
// In 256 colors fall back to red
|
||||
"DiagnosticFloatingWarn guifg=NvimLightYellow ctermfg=217 guibg=NvimDarkGrey1 ctermbg=232",
|
||||
"DiagnosticFloatingInfo guifg=NvimLightCyan ctermfg=123 guibg=NvimDarkGrey1 ctermbg=232",
|
||||
// In 256 colors fall back to cyan
|
||||
"DiagnosticFloatingHint guifg=NvimLightBlue ctermfg=123 guibg=NvimDarkGrey1 ctermbg=232",
|
||||
"DiagnosticFloatingOk guifg=NvimLightGreen ctermfg=158 guibg=NvimDarkGrey1 ctermbg=232",
|
||||
"DiagnosticDeprecated guisp=NvimLightRed gui=strikethrough cterm=strikethrough",
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -2828,6 +2886,29 @@ color_name_table_T color_name_table[] = {
|
||||
{ "NavajoWhite4", RGB_(0x8b, 0x79, 0x5e) },
|
||||
{ "Navy", RGB_(0x00, 0x00, 0x80) },
|
||||
{ "NavyBlue", RGB_(0x0, 0x0, 0x80) },
|
||||
// Default Neovim palettes.
|
||||
// Dark/light palette is used for background in dark/light color scheme and
|
||||
// for foreground in light/dark color scheme.
|
||||
{ "NvimDarkBlue", RGB_(0x00, 0x50, 0x78) }, // cterm=24
|
||||
{ "NvimDarkCyan", RGB_(0x00, 0x76, 0x76) }, // cterm=30
|
||||
{ "NvimDarkGreen", RGB_(0x01, 0x58, 0x25) }, // cterm=22
|
||||
{ "NvimDarkGrey1", RGB_(0x0a, 0x0b, 0x10) }, // cterm=232
|
||||
{ "NvimDarkGrey2", RGB_(0x1c, 0x1d, 0x23) }, // cterm=234
|
||||
{ "NvimDarkGrey3", RGB_(0x2c, 0x2e, 0x33) }, // cterm=236
|
||||
{ "NvimDarkGrey4", RGB_(0x4f, 0x52, 0x58) }, // cterm=239
|
||||
{ "NvimDarkMagenta", RGB_(0x4c, 0x00, 0x49) }, // cterm=53
|
||||
{ "NvimDarkRed", RGB_(0x5e, 0x00, 0x09) }, // cterm=52
|
||||
{ "NvimDarkYellow", RGB_(0x6e, 0x56, 0x00) }, // cterm=58
|
||||
{ "NvimLightBlue", RGB_(0x9f, 0xd8, 0xff) }, // cterm=153
|
||||
{ "NvimLightCyan", RGB_(0x83, 0xef, 0xef) }, // cterm=123
|
||||
{ "NvimLightGreen", RGB_(0xaa, 0xed, 0xb7) }, // cterm=158
|
||||
{ "NvimLightGrey1", RGB_(0xeb, 0xee, 0xf5) }, // cterm=255
|
||||
{ "NvimLightGrey2", RGB_(0xd7, 0xda, 0xe1) }, // cterm=253
|
||||
{ "NvimLightGrey3", RGB_(0xc4, 0xc6, 0xcd) }, // cterm=251
|
||||
{ "NvimLightGrey4", RGB_(0x9b, 0x9e, 0xa4) }, // cterm=247
|
||||
{ "NvimLightMagenta", RGB_(0xff, 0xc3, 0xfa) }, // cterm=189
|
||||
{ "NvimLightRed", RGB_(0xff, 0xbc, 0xb5) }, // cterm=217
|
||||
{ "NvimLightYellow", RGB_(0xf4, 0xd8, 0x8c) }, // cterm=222
|
||||
{ "OldLace", RGB_(0xfd, 0xf5, 0xe6) },
|
||||
{ "Olive", RGB_(0x80, 0x80, 0x00) },
|
||||
{ "OliveDrab", RGB_(0x6b, 0x8e, 0x23) },
|
||||
|
@ -561,7 +561,7 @@ describe('API: get highlight', function()
|
||||
end)
|
||||
|
||||
it('can correctly detect links', function()
|
||||
command('hi String guifg=#a6e3a1')
|
||||
command('hi String guifg=#a6e3a1 ctermfg=NONE')
|
||||
command('hi link @string string')
|
||||
command('hi link @string.cpp @string')
|
||||
eq({ fg = 10937249 }, meths.get_hl(0, { name = 'String' }))
|
||||
|
@ -14,8 +14,10 @@ describe('autoread TUI FocusGained/FocusLost', function()
|
||||
|
||||
before_each(function()
|
||||
clear()
|
||||
screen = thelpers.screen_setup(0, '["'..nvim_prog
|
||||
..'", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile noshowcmd noruler"]')
|
||||
screen = thelpers.screen_setup(
|
||||
0,
|
||||
'["'..nvim_prog..'", "-u", "NONE", "-i", "NONE", "--cmd", "colorscheme vim", "--cmd", "set noswapfile noshowcmd noruler"]'
|
||||
)
|
||||
end)
|
||||
|
||||
teardown(function()
|
||||
|
@ -70,17 +70,18 @@ describe('command-line option', function()
|
||||
-- data from the terminal #18181
|
||||
funcs.termopen(string.format([[echo "" | %s]], table.concat(args, " ")))
|
||||
screen:expect([[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{2:[No Name] 0,0-1 All}|
|
||||
|
|
||||
{1:^ }|
|
||||
{2:~ }|
|
||||
{2:~ }|
|
||||
{2:~ }|
|
||||
{2:~ }|
|
||||
{3:[No Name] 0,0-1 All}|
|
||||
{1: }|
|
||||
|
|
||||
]], {
|
||||
[1] = {foreground = tonumber('0x4040ff'), fg_indexed=true},
|
||||
[2] = {bold = true, reverse = true}
|
||||
[1] = {bg_indexed = true, foreground = Screen.colors.Grey91, background = tonumber('0x161616'), fg_indexed = true},
|
||||
[2] = {bg_indexed = true, foreground = Screen.colors.Gray30, background = tonumber('0x161616'), fg_indexed = true},
|
||||
[3] = {bg_indexed = true, foreground = tonumber('0xd2d2d2'), background = Screen.colors.Black , fg_indexed = true},
|
||||
})
|
||||
feed('i:cq<CR>')
|
||||
screen:expect([[
|
||||
|
@ -38,6 +38,11 @@ module.nvim_argv = {
|
||||
'--cmd', module.nvim_set,
|
||||
'--cmd', 'mapclear',
|
||||
'--cmd', 'mapclear!',
|
||||
-- Make screentest work after changing to the new default color scheme
|
||||
-- Source 'vim' color scheme without side effects
|
||||
-- TODO: rewrite tests
|
||||
'--cmd', 'lua f=io.open("runtime/colors/vim.vim", "r"); l=f:read("*a"); f:close(); vim.api.nvim_exec2(l, {})',
|
||||
'--cmd', 'unlet g:colors_name',
|
||||
'--embed'}
|
||||
|
||||
-- Directory containing nvim.
|
||||
|
@ -12,7 +12,7 @@ describe('api', function()
|
||||
helpers.clear()
|
||||
os.remove(socket_name)
|
||||
screen = child_session.screen_setup(0, '["'..helpers.nvim_prog
|
||||
..'", "-u", "NONE", "-i", "NONE", "--cmd", "'..helpers.nvim_set..'"]')
|
||||
..'", "-u", "NONE", "-i", "NONE", "--cmd", "colorscheme vim", "--cmd", "'..helpers.nvim_set..'"]')
|
||||
end)
|
||||
after_each(function()
|
||||
os.remove(socket_name)
|
||||
|
@ -446,8 +446,10 @@ end)
|
||||
describe('terminal input', function()
|
||||
it('sends various special keys with modifiers', function()
|
||||
clear()
|
||||
local screen = thelpers.screen_setup(0,
|
||||
string.format([=[["%s", "-u", "NONE", "-i", "NONE", "--cmd", "startinsert"]]=], nvim_prog))
|
||||
local screen = thelpers.screen_setup(
|
||||
0,
|
||||
string.format([=[["%s", "-u", "NONE", "-i", "NONE", "--cmd", 'colorscheme vim', "--cmd", "startinsert"]]=], nvim_prog)
|
||||
)
|
||||
screen:expect{grid=[[
|
||||
{1: } |
|
||||
{4:~ }|
|
||||
|
@ -188,16 +188,22 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
..[[", "-u", "NONE", "-i", "NONE", "-E", "--cmd", "let @r = ']]..str..[['", ]]
|
||||
-- <Left> and <Right> don't always work
|
||||
..[["--cmd", "cnoremap <C-X> <Left>", "--cmd", "cnoremap <C-O> <Right>"]]..']', 70)
|
||||
screen:set_default_attr_ids({
|
||||
[1] = {foreground = 253, background = 11};
|
||||
[3] = {bold = true},
|
||||
[16] = {background = 234, foreground = 253};
|
||||
[17] = {reverse = true, background = 234, foreground = 253};
|
||||
})
|
||||
-- Also check for real cursor position, as it is used for stuff like input methods
|
||||
screen._handle_busy_start = function() end
|
||||
screen._handle_busy_stop = function() end
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:{1:^ } |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::}{17:^ }{16: }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
end
|
||||
@ -212,23 +218,23 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
it('at the end', function()
|
||||
feed('<C-R>r')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:aaaaaaaa{1:^ } |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::aaaaaaaa}{17:^ }{16: }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 9}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:aaaaaaa^a{2: } |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::aaaaaaa^a}{1: }{16: }|
|
||||
|
|
||||
]])
|
||||
eq({6, 8}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -237,23 +243,23 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
it('near the end', function()
|
||||
feed('<C-R>r<C-X><C-X>')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:aaaaaa{1:^a}a |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::aaaaaa}{17:^a}{16:a }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 7}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:aaaaa^a{2:a}a |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::aaaaa^a}{1:a}{16:a }|
|
||||
|
|
||||
]])
|
||||
eq({6, 6}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -262,23 +268,23 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
it('near the start', function()
|
||||
feed('<C-R>r<C-B><C-O>')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:a{1:^a}aaaaaa |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::a}{17:^a}{16:aaaaaa }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 2}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:^a{2:a}aaaaaa |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::^a}{1:a}{16:aaaaaa }|
|
||||
|
|
||||
]])
|
||||
eq({6, 1}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -293,23 +299,23 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
it('at the end', function()
|
||||
feed('<C-R>r')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:µµµµµµµµ{1:^ } |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::µµµµµµµµ}{17:^ }{16: }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 17}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:µµµµµµµ^µ{2: } |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::µµµµµµµ^µ}{1: }{16: }|
|
||||
|
|
||||
]])
|
||||
eq({6, 15}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -318,23 +324,23 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
it('near the end', function()
|
||||
feed('<C-R>r<C-X><C-X>')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:µµµµµµ{1:^µ}µ |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::µµµµµµ}{17:^µ}{16:µ }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 13}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:µµµµµ^µ{2:µ}µ |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::µµµµµ^µ}{1:µ}{16:µ }|
|
||||
|
|
||||
]])
|
||||
eq({6, 11}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -343,23 +349,23 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
it('near the start', function()
|
||||
feed('<C-R>r<C-B><C-O>')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:µ{1:^µ}µµµµµµ |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::µ}{17:^µ}{16:µµµµµµ }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 3}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:^µ{2:µ}µµµµµµ |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::^µ}{1:µ}{16:µµµµµµ }|
|
||||
|
|
||||
]])
|
||||
eq({6, 1}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -376,23 +382,23 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
it('at the end', function()
|
||||
feed('<C-R>r')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳{1:^ } |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳}{17:^ }{16: }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 33}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:µ̳µ̳µ̳µ̳µ̳µ̳µ̳^µ̳{2: } |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::µ̳µ̳µ̳µ̳µ̳µ̳µ̳^µ̳}{1: }{16: }|
|
||||
|
|
||||
]])
|
||||
eq({6, 29}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -401,23 +407,23 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
it('near the end', function()
|
||||
feed('<C-R>r<C-X><C-X>')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:µ̳µ̳µ̳µ̳µ̳µ̳{1:^µ̳}µ̳ |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::µ̳µ̳µ̳µ̳µ̳µ̳}{17:^µ̳}{16:µ̳ }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 25}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:µ̳µ̳µ̳µ̳µ̳^µ̳{2:µ̳}µ̳ |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::µ̳µ̳µ̳µ̳µ̳^µ̳}{1:µ̳}{16:µ̳ }|
|
||||
|
|
||||
]])
|
||||
eq({6, 21}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -426,23 +432,23 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
it('near the start', function()
|
||||
feed('<C-R>r<C-B><C-O>')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:µ̳{1:^µ̳}µ̳µ̳µ̳µ̳µ̳µ̳ |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::µ̳}{17:^µ̳}{16:µ̳µ̳µ̳µ̳µ̳µ̳ }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 5}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:^µ̳{2:µ̳}µ̳µ̳µ̳µ̳µ̳µ̳ |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::^µ̳}{1:µ̳}{16:µ̳µ̳µ̳µ̳µ̳µ̳ }|
|
||||
|
|
||||
]])
|
||||
eq({6, 1}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -459,23 +465,23 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
it('at the end', function()
|
||||
feed('<C-R>r')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:哦哦哦哦哦哦哦哦{1:^ } |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::哦哦哦哦哦哦哦哦}{17:^ }{16: }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 25}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:哦哦哦哦哦哦哦^哦{2: } |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::哦哦哦哦哦哦哦^哦}{1: }{16: }|
|
||||
|
|
||||
]])
|
||||
eq({6, 22}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -484,23 +490,23 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
it('near the end', function()
|
||||
feed('<C-R>r<C-X><C-X>')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:哦哦哦哦哦哦{1:^哦}哦 |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::哦哦哦哦哦哦}{17:^哦}{16:哦 }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 19}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:哦哦哦哦哦^哦{2:哦}哦 |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::哦哦哦哦哦^哦}{1:哦}{16:哦 }|
|
||||
|
|
||||
]])
|
||||
eq({6, 16}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -509,23 +515,23 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
it('near the start', function()
|
||||
feed('<C-R>r<C-B><C-O>')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:哦{1:^哦}哦哦哦哦哦哦 |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::哦}{17:^哦}{16:哦哦哦哦哦哦 }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 4}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:^哦{2:哦}哦哦哦哦哦哦 |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::^哦}{1:哦}{16:哦哦哦哦哦哦 }|
|
||||
|
|
||||
]])
|
||||
eq({6, 1}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -536,24 +542,24 @@ describe('buffer cursor position is correct in terminal without number column',
|
||||
setup_ex_register('aaaaaaaa ')
|
||||
feed('<C-R>r')
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:aaaaaaaa {1:^ } |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::aaaaaaaa }{17:^ }{16: }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
matches('^:aaaaaaaa [ ]*$', eval('nvim_get_current_line()'))
|
||||
eq({6, 13}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
:aaaaaaaa ^ {2: } |
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16: }|
|
||||
{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{16::aaaaaaaa ^ }{1: }{16: }|
|
||||
|
|
||||
]])
|
||||
eq({6, 12}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -568,16 +574,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
..[[", "-u", "NONE", "-i", "NONE", "-E", "--cmd", "let @r = ']]..str..[['", ]]
|
||||
-- <Left> and <Right> don't always work
|
||||
..[["--cmd", "cnoremap <C-X> <Left>", "--cmd", "cnoremap <C-O> <Right>"]]..']', 70)
|
||||
screen:set_default_attr_ids({
|
||||
[1] = {foreground = 253, background = 11};
|
||||
[3] = {bold = true},
|
||||
[7] = {foreground = 130};
|
||||
[16] = {background = 234, foreground = 253};
|
||||
[17] = {reverse = true, background = 234, foreground = 253};
|
||||
})
|
||||
-- Also check for real cursor position, as it is used for stuff like input methods
|
||||
screen._handle_busy_start = function() end
|
||||
screen._handle_busy_stop = function() end
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:{1:^ } |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::}{17:^ }{16: }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
end
|
||||
@ -595,23 +608,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
it('at the end', function()
|
||||
feed('<C-R>r')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:aaaaaaaa{1:^ } |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::aaaaaaaa}{17:^ }{16: }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 9}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:aaaaaaa^a{2: } |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::aaaaaaa^a}{1: }{16: }|
|
||||
|
|
||||
]])
|
||||
eq({6, 8}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -620,23 +633,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
it('near the end', function()
|
||||
feed('<C-R>r<C-X><C-X>')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:aaaaaa{1:^a}a |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::aaaaaa}{17:^a}{16:a }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 7}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:aaaaa^a{2:a}a |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::aaaaa^a}{1:a}{16:a }|
|
||||
|
|
||||
]])
|
||||
eq({6, 6}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -645,23 +658,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
it('near the start', function()
|
||||
feed('<C-R>r<C-B><C-O>')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:a{1:^a}aaaaaa |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::a}{17:^a}{16:aaaaaa }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 2}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:^a{2:a}aaaaaa |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::^a}{1:a}{16:aaaaaa }|
|
||||
|
|
||||
]])
|
||||
eq({6, 1}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -676,23 +689,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
it('at the end', function()
|
||||
feed('<C-R>r')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:µµµµµµµµ{1:^ } |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::µµµµµµµµ}{17:^ }{16: }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 17}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:µµµµµµµ^µ{2: } |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::µµµµµµµ^µ}{1: }{16: }|
|
||||
|
|
||||
]])
|
||||
eq({6, 15}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -701,23 +714,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
it('near the end', function()
|
||||
feed('<C-R>r<C-X><C-X>')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:µµµµµµ{1:^µ}µ |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::µµµµµµ}{17:^µ}{16:µ }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 13}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:µµµµµ^µ{2:µ}µ |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::µµµµµ^µ}{1:µ}{16:µ }|
|
||||
|
|
||||
]])
|
||||
eq({6, 11}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -726,23 +739,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
it('near the start', function()
|
||||
feed('<C-R>r<C-B><C-O>')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:µ{1:^µ}µµµµµµ |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::µ}{17:^µ}{16:µµµµµµ }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 3}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:^µ{2:µ}µµµµµµ |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::^µ}{1:µ}{16:µµµµµµ }|
|
||||
|
|
||||
]])
|
||||
eq({6, 1}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -759,23 +772,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
it('at the end', function()
|
||||
feed('<C-R>r')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳{1:^ } |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::µ̳µ̳µ̳µ̳µ̳µ̳µ̳µ̳}{17:^ }{16: }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 33}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:µ̳µ̳µ̳µ̳µ̳µ̳µ̳^µ̳{2: } |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::µ̳µ̳µ̳µ̳µ̳µ̳µ̳^µ̳}{1: }{16: }|
|
||||
|
|
||||
]])
|
||||
eq({6, 29}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -784,23 +797,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
it('near the end', function()
|
||||
feed('<C-R>r<C-X><C-X>')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:µ̳µ̳µ̳µ̳µ̳µ̳{1:^µ̳}µ̳ |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::µ̳µ̳µ̳µ̳µ̳µ̳}{17:^µ̳}{16:µ̳ }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 25}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:µ̳µ̳µ̳µ̳µ̳^µ̳{2:µ̳}µ̳ |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::µ̳µ̳µ̳µ̳µ̳^µ̳}{1:µ̳}{16:µ̳ }|
|
||||
|
|
||||
]])
|
||||
eq({6, 21}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -809,23 +822,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
it('near the start', function()
|
||||
feed('<C-R>r<C-B><C-O>')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:µ̳{1:^µ̳}µ̳µ̳µ̳µ̳µ̳µ̳ |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::µ̳}{17:^µ̳}{16:µ̳µ̳µ̳µ̳µ̳µ̳ }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 5}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:^µ̳{2:µ̳}µ̳µ̳µ̳µ̳µ̳µ̳ |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::^µ̳}{1:µ̳}{16:µ̳µ̳µ̳µ̳µ̳µ̳ }|
|
||||
|
|
||||
]])
|
||||
eq({6, 1}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -842,23 +855,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
it('at the end', function()
|
||||
feed('<C-R>r')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:哦哦哦哦哦哦哦哦{1:^ } |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::哦哦哦哦哦哦哦哦}{17:^ }{16: }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 25}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:哦哦哦哦哦哦哦^哦{2: } |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::哦哦哦哦哦哦哦^哦}{1: }{16: }|
|
||||
|
|
||||
]])
|
||||
eq({6, 22}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -867,23 +880,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
it('near the end', function()
|
||||
feed('<C-R>r<C-X><C-X>')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:哦哦哦哦哦哦{1:^哦}哦 |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::哦哦哦哦哦哦}{17:^哦}{16:哦 }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 19}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:哦哦哦哦哦^哦{2:哦}哦 |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::哦哦哦哦哦^哦}{1:哦}{16:哦 }|
|
||||
|
|
||||
]])
|
||||
eq({6, 16}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -892,23 +905,23 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
it('near the start', function()
|
||||
feed('<C-R>r<C-B><C-O>')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:哦{1:^哦}哦哦哦哦哦哦 |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::哦}{17:^哦}{16:哦哦哦哦哦哦 }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
eq({6, 4}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:^哦{2:哦}哦哦哦哦哦哦 |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::^哦}{1:哦}{16:哦哦哦哦哦哦 }|
|
||||
|
|
||||
]])
|
||||
eq({6, 1}, eval('nvim_win_get_cursor(0)'))
|
||||
@ -919,24 +932,24 @@ describe('buffer cursor position is correct in terminal with number column', fun
|
||||
setup_ex_register('aaaaaaaa ')
|
||||
feed('<C-R>r')
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:aaaaaaaa {1:^ } |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::aaaaaaaa }{17:^ }{16: }|
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
matches('^:aaaaaaaa [ ]*$', eval('nvim_get_current_line()'))
|
||||
eq({6, 13}, eval('nvim_win_get_cursor(0)'))
|
||||
feed([[<C-\><C-N>]])
|
||||
screen:expect([[
|
||||
{7: 1 } |
|
||||
{7: 2 } |
|
||||
{7: 3 } |
|
||||
{7: 4 } |
|
||||
{7: 5 }Entering Ex mode. Type "visual" to go to Normal mode. |
|
||||
{7: 6 }:aaaaaaaa ^ {2: } |
|
||||
{7: 1 }{16: }|
|
||||
{7: 2 }{16: }|
|
||||
{7: 3 }{16: }|
|
||||
{7: 4 }{16: }|
|
||||
{7: 5 }{16:Entering Ex mode. Type "visual" to go to Normal mode. }|
|
||||
{7: 6 }{16::aaaaaaaa ^ }{1: }{16: }|
|
||||
|
|
||||
]])
|
||||
eq({6, 12}, eval('nvim_win_get_cursor(0)'))
|
||||
|
@ -40,8 +40,12 @@ describe('TUI', function()
|
||||
clear()
|
||||
local child_server = new_pipename()
|
||||
screen = thelpers.screen_setup(0,
|
||||
string.format([=[["%s", "--listen", "%s", "-u", "NONE", "-i", "NONE", "--cmd", "%s laststatus=2 background=dark"]]=],
|
||||
nvim_prog, child_server, nvim_set))
|
||||
string.format(
|
||||
[=[["%s", "--listen", "%s", "-u", "NONE", "-i", "NONE", "--cmd", "%s laststatus=2 background=dark", "--cmd", "colorscheme vim"]]=],
|
||||
nvim_prog,
|
||||
child_server,
|
||||
nvim_set
|
||||
))
|
||||
screen:expect([[
|
||||
{1: } |
|
||||
{4:~ }|
|
||||
@ -1826,7 +1830,7 @@ describe('TUI', function()
|
||||
})
|
||||
screen:attach()
|
||||
exec([[
|
||||
call termopen([v:progpath, '--clean', '--cmd', 'let start = reltime() | while v:true | if reltimefloat(reltime(start)) > 2 | break | endif | endwhile'])
|
||||
call termopen([v:progpath, '--clean', '--cmd', 'colorscheme vim', '--cmd', 'let start = reltime() | while v:true | if reltimefloat(reltime(start)) > 2 | break | endif | endwhile'])
|
||||
sleep 500m
|
||||
vs new
|
||||
]])
|
||||
@ -1852,7 +1856,7 @@ describe('TUI', function()
|
||||
write_file(script_file, [=[
|
||||
local ffi = require('ffi')
|
||||
ffi.cdef([[int execl(const char *, const char *, ...);]])
|
||||
ffi.C.execl(vim.v.progpath, 'Xargv0nvim', '--clean')
|
||||
ffi.C.execl(vim.v.progpath, 'Xargv0nvim', '--clean', '--cmd', 'colorscheme vim')
|
||||
]=])
|
||||
finally(function()
|
||||
os.remove(script_file)
|
||||
@ -1870,12 +1874,12 @@ describe('TUI', function()
|
||||
]]}
|
||||
feed_data(':put =v:argv + [v:progname]\n')
|
||||
screen:expect{grid=[[
|
||||
Xargv0nvim |
|
||||
--embed |
|
||||
--clean |
|
||||
--cmd |
|
||||
colorscheme vim |
|
||||
{1:X}argv0nvim |
|
||||
{5:[No Name] [+] 5,1 Bot}|
|
||||
4 more lines |
|
||||
{5:[No Name] [+] 7,1 Bot}|
|
||||
6 more lines |
|
||||
{3:-- TERMINAL --} |
|
||||
]]}
|
||||
end)
|
||||
@ -1899,8 +1903,11 @@ describe('TUI', function()
|
||||
end)
|
||||
|
||||
it('<C-h> #10134', function()
|
||||
local screen = thelpers.screen_setup(0, '["'..nvim_prog
|
||||
..[[", "-u", "NONE", "-i", "NONE", "--cmd", "set noruler", "--cmd", ':nnoremap <C-h> :echomsg "\<C-h\>"<CR>']]..']')
|
||||
local screen = thelpers.screen_setup(
|
||||
0,
|
||||
'["'..nvim_prog..[[", "-u", "NONE", "-i", "NONE", "--cmd", "colorscheme vim", ]]
|
||||
..[["--cmd", "set noruler", "--cmd", ':nnoremap <C-h> :echomsg "\<C-h\>"<CR>']]..']'
|
||||
)
|
||||
screen:expect{grid=[[
|
||||
{1: } |
|
||||
{4:~ }|
|
||||
@ -1924,8 +1931,12 @@ describe('TUI', function()
|
||||
end)
|
||||
|
||||
it('draws line with many trailing spaces correctly #24955', function()
|
||||
local screen = thelpers.screen_setup(0, '["'..nvim_prog..[[", "-u", "NONE", "-i", "NONE"]]
|
||||
..[[, "--cmd", "call setline(1, ['1st line' .. repeat(' ', 153), '2nd line'])"]]..']', 80)
|
||||
local screen = thelpers.screen_setup(
|
||||
0,
|
||||
'["'..nvim_prog..[[", "-u", "NONE", "-i", "NONE", "--cmd", "colorscheme vim"]]
|
||||
..[[, "--cmd", "call setline(1, ['1st line' .. repeat(' ', 153), '2nd line'])"]]..']',
|
||||
80
|
||||
)
|
||||
screen:expect{grid=[[
|
||||
{1:1}st line |
|
||||
|
|
||||
@ -1953,6 +1964,7 @@ describe('TUI UIEnter/UILeave', function()
|
||||
clear()
|
||||
local screen = thelpers.screen_setup(0,
|
||||
'["'..nvim_prog..'", "-u", "NONE", "-i", "NONE"'
|
||||
..[[, "--cmd", "colorscheme vim"]]
|
||||
..[[, "--cmd", "set noswapfile noshowcmd noruler"]]
|
||||
..[[, "--cmd", "let g:evs = []"]]
|
||||
..[[, "--cmd", "autocmd UIEnter * :call add(g:evs, 'UIEnter')"]]
|
||||
@ -1991,7 +2003,8 @@ describe('TUI FocusGained/FocusLost', function()
|
||||
local child_server = new_pipename()
|
||||
screen = thelpers.screen_setup(0,
|
||||
string.format(
|
||||
[=[["%s", "--listen", "%s", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile noshowcmd noruler"]]=],
|
||||
'["%s", "--listen", "%s", "-u", "NONE", "-i", "NONE", "--cmd", "colorscheme vim", '
|
||||
..'"--cmd", "set noswapfile noshowcmd noruler"]',
|
||||
nvim_prog, child_server))
|
||||
screen:expect([[
|
||||
{1: } |
|
||||
@ -2198,14 +2211,16 @@ describe("TUI 't_Co' (terminal colors)", function()
|
||||
-- This is ugly because :term/termopen() forces TERM=xterm-256color.
|
||||
-- TODO: Revisit this after jobstart/termopen accept `env` dict.
|
||||
screen = thelpers.screen_setup(0, string.format(
|
||||
[=[['sh', '-c', 'LANG=C TERM=%s %s %s -u NONE -i NONE --cmd "%s"']]=],
|
||||
[=[['sh', '-c', 'LANG=C TERM=%s %s %s -u NONE -i NONE --cmd "colorscheme vim" --cmd "%s"']]=],
|
||||
term or "",
|
||||
(colorterm ~= nil and "COLORTERM="..colorterm or ""),
|
||||
nvim_prog,
|
||||
nvim_set))
|
||||
|
||||
local tline
|
||||
if maxcolors == 8 or maxcolors == 16 then
|
||||
if maxcolors == 8 then
|
||||
tline = "{9:~ }"
|
||||
elseif maxcolors == 16 then
|
||||
tline = "~ "
|
||||
else
|
||||
tline = "{4:~ }"
|
||||
@ -2528,7 +2543,7 @@ describe("TUI", function()
|
||||
-- This is ugly because :term/termopen() forces TERM=xterm-256color.
|
||||
-- TODO: Revisit this after jobstart/termopen accept `env` dict.
|
||||
local cmd = string.format(
|
||||
[=[['sh', '-c', 'LANG=C %s -u NONE -i NONE %s --cmd "%s"']]=],
|
||||
[=[['sh', '-c', 'LANG=C %s -u NONE -i NONE %s --cmd "colorscheme vim" --cmd "%s"']]=],
|
||||
nvim_prog,
|
||||
extra_args or "",
|
||||
nvim_set)
|
||||
@ -2591,7 +2606,7 @@ describe('TUI bg color', function()
|
||||
local function setup_bg_test()
|
||||
clear()
|
||||
screen = thelpers.screen_setup(0, '["'..nvim_prog
|
||||
..'", "-u", "NONE", "-i", "NONE", "--cmd", "set noswapfile", '
|
||||
..'", "-u", "NONE", "-i", "NONE", "--cmd", "colorscheme vim", "--cmd", "set noswapfile", '
|
||||
..'"-c", "autocmd OptionSet background echo \\"did OptionSet, yay!\\""]')
|
||||
end
|
||||
|
||||
@ -2712,8 +2727,13 @@ describe("TUI as a client", function()
|
||||
set_session(server_super)
|
||||
local server_pipe = new_pipename()
|
||||
local screen_server = thelpers.screen_setup(0,
|
||||
string.format([=[["%s", "--listen", "%s", "-u", "NONE", "-i", "NONE", "--cmd", "%s laststatus=2 background=dark"]]=],
|
||||
nvim_prog, server_pipe, nvim_set))
|
||||
string.format(
|
||||
'["%s", "--listen", "%s", "-u", "NONE", "-i", "NONE", "--cmd", "colorscheme vim", '
|
||||
..'"--cmd", "%s laststatus=2 background=dark"]',
|
||||
nvim_prog,
|
||||
server_pipe,
|
||||
nvim_set
|
||||
))
|
||||
|
||||
feed_data("iHello, World")
|
||||
screen_server:expect{grid=[[
|
||||
@ -2839,8 +2859,13 @@ describe("TUI as a client", function()
|
||||
set_session(server_super)
|
||||
local server_pipe = new_pipename()
|
||||
local screen_server = thelpers.screen_setup(0,
|
||||
string.format([=[["%s", "--listen", "%s", "-u", "NONE", "-i", "NONE", "--cmd", "%s laststatus=2 background=dark"]]=],
|
||||
nvim_prog, server_pipe, nvim_set))
|
||||
string.format(
|
||||
'["%s", "--listen", "%s", "-u", "NONE", "-i", "NONE", "--cmd", "colorscheme vim", '
|
||||
..'"--cmd", "%s laststatus=2 background=dark"]',
|
||||
nvim_prog,
|
||||
server_pipe,
|
||||
nvim_set
|
||||
))
|
||||
screen_server:expect{grid=[[
|
||||
{1: } |
|
||||
{4:~ }|
|
||||
|
@ -215,7 +215,7 @@ describe('ui/cursor', function()
|
||||
m.hl_id = 64
|
||||
m.attr = {background = Screen.colors.DarkGray}
|
||||
end
|
||||
if m.id_lm then m.id_lm = 67 end
|
||||
if m.id_lm then m.id_lm = 69 end
|
||||
end
|
||||
|
||||
-- Assert the new expectation.
|
||||
|
@ -26,6 +26,12 @@ local function test_embed(ext_linegrid)
|
||||
[3] = {bold = true, foreground = Screen.colors.Blue1},
|
||||
[4] = {bold = true, foreground = Screen.colors.Green},
|
||||
[5] = {bold = true, reverse = true},
|
||||
[6] = {foreground = Screen.colors.NvimDarkGrey3, background = Screen.colors.NvimLightGrey1};
|
||||
[7] = {foreground = Screen.colors.NvimDarkRed};
|
||||
[8] = {foreground = Screen.colors.NvimDarkCyan};
|
||||
[9] = {foreground = Screen.colors.NvimLightGrey3, background = Screen.colors.NvimDarkGrey1};
|
||||
[10] = {foreground = Screen.colors.NvimLightRed};
|
||||
[11] = {foreground = Screen.colors.NvimLightCyan};
|
||||
})
|
||||
end
|
||||
|
||||
@ -36,10 +42,10 @@ local function test_embed(ext_linegrid)
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Error detected while processing pre-vimrc command line: |
|
||||
E121: Undefined variable: invalid |
|
||||
Press ENTER or type command to continue^ |
|
||||
{6: }|
|
||||
{7:Error detected while processing pre-vimrc command line:} |
|
||||
{7:E121: Undefined variable: invalid} |
|
||||
{8:Press ENTER or type command to continue}^ |
|
||||
]])
|
||||
|
||||
feed('<cr>')
|
||||
@ -64,11 +70,11 @@ local function test_embed(ext_linegrid)
|
||||
|
|
||||
|
|
||||
|
|
||||
{5: }|
|
||||
Error detected while processing pre-vimrc command line: |
|
||||
foo |
|
||||
{1:bar} |
|
||||
{4:Press ENTER or type command to continue}^ |
|
||||
{9: }|
|
||||
{7:Error detected while processing pre-vimrc command line:} |
|
||||
{7:foo} |
|
||||
{10:bar} |
|
||||
{11:Press ENTER or type command to continue}^ |
|
||||
]])
|
||||
end)
|
||||
|
||||
@ -78,11 +84,11 @@ local function test_embed(ext_linegrid)
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
Error detected while processing pre-vimrc command line: |
|
||||
foo |
|
||||
bar |
|
||||
Press ENTER or type command to continue^ |
|
||||
{6: }|
|
||||
{7:Error detected while processing pre-vimrc command line:} |
|
||||
{7:foo} |
|
||||
{7:bar} |
|
||||
{8:Press ENTER or type command to continue}^ |
|
||||
]], condition=function()
|
||||
eq(Screen.colors.Green, screen.default_colors.rgb_bg)
|
||||
end}
|
||||
@ -144,7 +150,7 @@ describe('--embed --listen UI', function()
|
||||
helpers.skip(helpers.is_os('win'))
|
||||
clear()
|
||||
local child_server = assert(helpers.new_pipename())
|
||||
funcs.jobstart({nvim_prog, '--embed', '--listen', child_server, '--clean'})
|
||||
funcs.jobstart({nvim_prog, '--embed', '--listen', child_server, '--clean', '--cmd', 'colorscheme vim'})
|
||||
retry(nil, nil, function() neq(nil, uv.fs_stat(child_server)) end)
|
||||
|
||||
local child_session = helpers.connect(child_server)
|
||||
|
@ -1185,7 +1185,7 @@ describe('float window', function()
|
||||
|
||||
it('defaults to NormalFloat highlight and inherited options', function()
|
||||
command('set number')
|
||||
command('hi NormalFloat guibg=#333333')
|
||||
command('hi NormalFloat guibg=#333333 guifg=NONE')
|
||||
feed('ix<cr>y<cr><esc>gg')
|
||||
local win = meths.open_win(0, false, {relative='editor', width=20, height=4, row=4, col=10})
|
||||
if multigrid then
|
||||
@ -1271,7 +1271,7 @@ describe('float window', function()
|
||||
command('set colorcolumn=1')
|
||||
command('set cursorline')
|
||||
command('set foldcolumn=1')
|
||||
command('hi NormalFloat guibg=#333333')
|
||||
command('hi NormalFloat guibg=#333333 guifg=NONE')
|
||||
feed('ix<cr>y<cr><esc>gg')
|
||||
local win = meths.open_win(0, false, {relative='editor', width=20, height=4, row=4, col=10, style='minimal'})
|
||||
if multigrid then
|
||||
@ -1399,7 +1399,7 @@ describe('float window', function()
|
||||
command('set colorcolumn=1')
|
||||
command('set cursorline')
|
||||
command('set foldcolumn=1')
|
||||
command('hi NormalFloat guibg=#333333')
|
||||
command('hi NormalFloat guibg=#333333 guifg=NONE')
|
||||
feed('ix<cr>y<cr><esc>gg')
|
||||
local win = meths.open_win(0, false, {relative='editor', width=20, height=4, row=4, col=10, style='minimal'})
|
||||
if multigrid then
|
||||
@ -1528,7 +1528,7 @@ describe('float window', function()
|
||||
command('set cursorline')
|
||||
command('set foldcolumn=1')
|
||||
command('set statuscolumn=%l%s%C')
|
||||
command('hi NormalFloat guibg=#333333')
|
||||
command('hi NormalFloat guibg=#333333 guifg=NONE')
|
||||
feed('ix<cr>y<cr><esc>gg')
|
||||
meths.open_win(0, false, {relative='editor', width=20, height=4, row=4, col=10, style='minimal'})
|
||||
if multigrid then
|
||||
@ -5921,7 +5921,7 @@ describe('float window', function()
|
||||
describe('float shown after pum', function()
|
||||
local win
|
||||
before_each(function()
|
||||
command('hi NormalFloat guibg=#333333')
|
||||
command('hi NormalFloat guibg=#333333 guifg=NONE')
|
||||
feed('i')
|
||||
funcs.complete(1, {'aa', 'word', 'longtext'})
|
||||
if multigrid then
|
||||
|
@ -72,7 +72,7 @@ describe('ext_hlstate detailed highlights', function()
|
||||
[6] = {{}, {{hi_name = "StatusLineNC", ui_name = "StatusLineNC", kind = "ui"}}},
|
||||
[7] = {{}, {{hi_name = "MsgArea", ui_name = "MsgArea", kind = "ui"}}},
|
||||
})
|
||||
command("hi clear VertSplit")
|
||||
command("hi clear WinSeparator")
|
||||
command("vsplit")
|
||||
|
||||
screen:expect([[
|
||||
|
@ -22,7 +22,7 @@ describe("shell command :!", function()
|
||||
before_each(function()
|
||||
clear()
|
||||
screen = child_session.screen_setup(0, '["'..helpers.nvim_prog..
|
||||
'", "-u", "NONE", "-i", "NONE", "--cmd", "'..helpers.nvim_set..'"]')
|
||||
'", "-u", "NONE", "-i", "NONE", "--cmd", "colorscheme vim", "--cmd", "'..helpers.nvim_set..'"]')
|
||||
screen:expect([[
|
||||
{1: } |
|
||||
{4:~ }|
|
||||
|
@ -89,7 +89,7 @@ describe('quickfix selection highlight', function()
|
||||
end)
|
||||
|
||||
it('using QuickFixLine highlight group', function()
|
||||
command('highlight QuickFixLine guibg=Red')
|
||||
command('highlight QuickFixLine guibg=Red guifg=NONE gui=NONE')
|
||||
|
||||
command('copen')
|
||||
|
||||
@ -124,7 +124,7 @@ describe('quickfix selection highlight', function()
|
||||
|
||||
it('combines with CursorLine', function()
|
||||
command('set cursorline')
|
||||
command('highlight QuickFixLine guifg=Red')
|
||||
command('highlight QuickFixLine guifg=Red guibg=NONE gui=NONE')
|
||||
command('highlight CursorLine guibg=Fuchsia')
|
||||
|
||||
command('copen')
|
||||
@ -160,7 +160,7 @@ describe('quickfix selection highlight', function()
|
||||
|
||||
it('QuickFixLine background takes precedence over CursorLine', function()
|
||||
command('set cursorline')
|
||||
command('highlight QuickFixLine guibg=Red')
|
||||
command('highlight QuickFixLine guibg=Red guifg=NONE gui=NONE')
|
||||
command('highlight CursorLine guibg=Fuchsia')
|
||||
|
||||
command('copen')
|
||||
|
@ -8,9 +8,15 @@ local funcs, meths = helpers.funcs, helpers.meths
|
||||
|
||||
describe('screen', function()
|
||||
local screen
|
||||
local nvim_argv = {helpers.nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N',
|
||||
'--cmd', 'set shortmess+=I background=light noswapfile belloff= noshowcmd noruler',
|
||||
'--embed'}
|
||||
local nvim_argv = {
|
||||
helpers.nvim_prog,
|
||||
'-u', 'NONE',
|
||||
'-i', 'NONE',
|
||||
'-N',
|
||||
'--cmd', 'set shortmess+=I background=light noswapfile belloff= noshowcmd noruler',
|
||||
'--cmd', 'colorscheme vim',
|
||||
'--embed',
|
||||
}
|
||||
|
||||
before_each(function()
|
||||
local screen_nvim = spawn(nvim_argv)
|
||||
@ -997,9 +1003,15 @@ describe('Screen default colors', function()
|
||||
local function startup(light, termcolors)
|
||||
local extra = (light and ' background=light') or ''
|
||||
|
||||
local nvim_argv = {helpers.nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N',
|
||||
'--cmd', 'set shortmess+=I noswapfile belloff= noshowcmd noruler'..extra,
|
||||
'--embed'}
|
||||
local nvim_argv = {
|
||||
helpers.nvim_prog,
|
||||
'-u', 'NONE',
|
||||
'-i', 'NONE',
|
||||
'-N',
|
||||
'--cmd', 'set shortmess+=I noswapfile belloff= noshowcmd noruler'..extra,
|
||||
'--cmd', 'colorscheme vim',
|
||||
'--embed',
|
||||
}
|
||||
local screen_nvim = spawn(nvim_argv)
|
||||
set_session(screen_nvim)
|
||||
screen = Screen.new()
|
||||
@ -1017,7 +1029,7 @@ describe('Screen default colors', function()
|
||||
it('can be set to light', function()
|
||||
startup(true, false)
|
||||
screen:expect{condition=function()
|
||||
eq({rgb_fg=Screen.colors.White, rgb_bg=0, rgb_sp=Screen.colors.Red,
|
||||
eq({rgb_bg=Screen.colors.White, rgb_fg=0, rgb_sp=Screen.colors.Red,
|
||||
cterm_bg=0, cterm_fg=0}, screen.default_colors)
|
||||
end}
|
||||
end)
|
||||
|
@ -93,3 +93,6 @@ let $HOME = expand(getcwd() . '/XfakeHOME')
|
||||
if !isdirectory($HOME)
|
||||
call mkdir($HOME)
|
||||
endif
|
||||
|
||||
" Use Vim's default color scheme
|
||||
colorscheme vim
|
||||
|
@ -810,6 +810,7 @@ endfunc
|
||||
" Test for :highlight command errors
|
||||
func Test_highlight_cmd_errors()
|
||||
if has('gui_running') || has('nvim')
|
||||
hi! Normal ctermfg=NONE ctermbg=NONE
|
||||
" This test doesn't fail in the MS-Windows console version.
|
||||
call assert_fails('hi Xcomment ctermfg=fg', 'E419:')
|
||||
call assert_fails('hi Xcomment ctermfg=bg', 'E420:')
|
||||
|
@ -214,7 +214,7 @@ endfunc
|
||||
func Test_echohl_completion()
|
||||
call feedkeys(":echohl no\<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
" call assert_equal('"echohl NonText Normal none', @:)
|
||||
call assert_equal('"echohl NonText Normal NormalFloat none', @:)
|
||||
call assert_equal('"echohl NonText Normal NormalFloat NormalNC none', @:)
|
||||
endfunc
|
||||
|
||||
func Test_syntax_arg_skipped()
|
||||
|
Loading…
Reference in New Issue
Block a user