aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorYichao Zhou <broken.zhou@gmail.com>2018-06-16 19:28:28 -0700
committerJustin M. Keyes <justinkz@gmail.com>2018-09-22 03:07:21 +0200
commit7f990741f7018b5e52833f2da6913b97c6d2d5ee (patch)
tree588ca0a71a6c007a608a549f2fabb19e2dc10f9f /runtime
parent4fa3492a6fcba4e58639ec1039b18e883576bdd3 (diff)
downloadrneovim-7f990741f7018b5e52833f2da6913b97c6d2d5ee.tar.gz
rneovim-7f990741f7018b5e52833f2da6913b97c6d2d5ee.tar.bz2
rneovim-7f990741f7018b5e52833f2da6913b97c6d2d5ee.zip
TUI: Reset cursor color when applicable #8572
Resets the TUI cursor color if: - current 'guicursor' mode does not specify a highlight group - cursor highlight group has "inverse" or "reverse" flag - on Nvim exit We interpret, "inverse" to mean "default cursor". Example: hi Cursor guifg=bg guibg=fg set termguicolors set guicursor=n-v-c-sm:block,i-ci-ve:ver25-Cursor,r-cr-o:hor20 * When the cursor shape is block, its color will be "inverse" * When the cursor shape is I-beam, its color will be `hi Cursor`. This is useful e.g. to prevent `set listchars=eol:¬` causing your cursor color to a low contrast color in insert mode because you cursor are often at EOL in insert mode. close #8572
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/options.txt16
1 files changed, 13 insertions, 3 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index fe2fbfc039..2f2db844e8 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -2789,17 +2789,27 @@ A jump table for the options with a short description can be found at |Q_op|.
of the numbers is zero, there is no blinking. E.g.: >
:set guicursor=n:blinkon0
< {group-name}
- a highlight group name, that sets the color and font
- for the cursor
+ Highlight group name that sets the color and font for
+ the cursor. |inverse|/reverse and no group-name are
+ interpreted as "the host terminal default cursor
+ colors" which usually invert bg and fg colors.
{group-name}/{group-name}
Two highlight group names, the first is used when
no language mappings are used, the other when they
are. |language-mapping|
Examples of parts:
- n-c-v:block-nCursor in Normal, Command-line and Visual mode, use a
+ n-c-v:block-nCursor In Normal, Command-line and Visual mode, use a
block cursor with colors from the "nCursor"
highlight group
+ n-v-c-sm:block,i-ci-ve:ver25-Cursor,r-cr-o:hor20
+ In Normal et al. modes, use a block cursor
+ with the default colors defined by the host
+ terminal. In Insert-likes modes, use
+ a vertical bar cursor with colors from
+ "Cursor" highlight group. In Replace-likes
+ modes, use a underline cursor with
+ default colors.
i-ci:ver30-iCursor-blinkwait300-blinkon200-blinkoff150
In Insert and Command-line Insert mode, use a
30% vertical bar cursor with colors from the