aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2021-07-31 09:51:26 +0800
committerGitHub <noreply@github.com>2021-07-30 21:51:26 -0400
commit5f01714b255d1c037abcb836b835096cf817adfd (patch)
treeb92eaf569a18e18340f9e7f85334cfc7da23ecc7 /runtime
parent15698eb5a1991790476febbd3b9f9b392e74f6b9 (diff)
downloadrneovim-5f01714b255d1c037abcb836b835096cf817adfd.tar.gz
rneovim-5f01714b255d1c037abcb836b835096cf817adfd.tar.bz2
rneovim-5f01714b255d1c037abcb836b835096cf817adfd.zip
vim-patch:8.1.2019: 'cursorline' always highlights the whole line (#15161)
Problem: 'cursorline' always highlights the whole line. Solution: Add 'cursorlineopt' to specify what is highlighted. (closes vim/vim#4693) https://github.com/vim/vim/commit/410e98a70bc00ea4bed51e55a8fe20e56a72c087
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/options.txt16
-rw-r--r--runtime/doc/quickref.txt1
-rw-r--r--runtime/doc/syntax.txt3
-rw-r--r--runtime/optwin.vim3
4 files changed, 19 insertions, 4 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index ab2230641d..5292847240 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1802,13 +1802,23 @@ A jump table for the options with a short description can be found at |Q_op|.
*'cursorline'* *'cul'* *'nocursorline'* *'nocul'*
'cursorline' 'cul' boolean (default off)
local to window
- Highlight the screen line of the cursor with CursorLine
- |hl-CursorLine|. Useful to easily spot the cursor. Will make screen
- redrawing slower.
+ Highlight the text line of the cursor with CursorLine |hl-CursorLine|.
+ Useful to easily spot the cursor. Will make screen redrawing slower.
When Visual mode is active the highlighting isn't used to make it
easier to see the selected text.
+ *'cursorlineopt'* *'culopt'*
+'cursorlineopt' 'culopt' string (default: "both")
+ local to window
+ Settings for how 'cursorline' is displayed. Valid values:
+ "line" Highlight the text line of the cursor with
+ CursorLine |hl-CursorLine|.
+ "number" Highlight the line number of the cursor with
+ CursorLineNr |hl-CursorLineNr|.
+ "both" Highlight as both "line" and "number" are set.
+
+
*'debug'*
'debug' string (default "")
global
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index c19b05f6c7..77e69a3eea 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -659,6 +659,7 @@ Short explanation of each option: *option-list*
'cursorbind' 'crb' move cursor in window as it moves in other windows
'cursorcolumn' 'cuc' highlight the screen column of the cursor
'cursorline' 'cul' highlight the screen line of the cursor
+'cursorlineopt' 'culopt' settings for 'cursorline'
'debug' set to "msg" to see all error messages
'define' 'def' pattern to be used to find a macro definition
'delcombine' 'deco' delete combining characters on their own
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index bc7a1e34c3..0cd3aed7a2 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -5065,7 +5065,8 @@ Substitute |:substitute| replacement text highlighting
LineNr Line number for ":number" and ":#" commands, and when 'number'
or 'relativenumber' option is set.
*hl-CursorLineNr*
-CursorLineNr Like LineNr when 'cursorline' or 'relativenumber' is set for
+CursorLineNr Like LineNr when 'cursorline' is set and 'cursorlineopt' is
+ set to "number" or "both", or 'relativenumber' is set, for
the cursor line.
*hl-MatchParen*
MatchParen The character under the cursor or just before it, if it
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index 633cb9e509..d4c10f7afa 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -440,6 +440,9 @@ if has("syntax")
call append("$", "cursorline\thighlight the screen line of the cursor")
call append("$", "\t(local to window)")
call <SID>BinOptionL("cul")
+ call append("$", "cursorlineopt\tspecifies which area 'cursorline' highlights")
+ call append("$", "\t(local to window)")
+ call <SID>OptionL("culopt")
call append("$", "colorcolumn\tcolumns to highlight")
call append("$", "\t(local to window)")
call <SID>OptionL("cc")