Conversation
|
can we add an option, that makes CursorLine highlight only the current screen line (in contrast to the complete physical line that might span several screen lines). This can be annoying. I have an old patch for that behaviour (that introduces the cursorscreenline option). https://groups.google.com/d/msg/vim_dev/1Yc9Z-82Z80/GXrCoPSdi3IJ |
|
There is the user request that want to highlight only the current line number but not line. |
|
Looks ready to include. Christian: You could add the "screenline" option to 'cursorlineopt' and merge in your old patch. Hmm, only question is what to use for "both" then, for highlighting the line number and the screen line? Or would you never highlight the line number and one screen line? |
Looking at this currently. It is a bit more effort than initially thought, because the |
|
> Christian: You could add the "screenline" option to 'cursorlineopt'
> and merge in your old patch. Hmm, only question is what to use for
> "both" then, for highlighting the line number and the screen line?
> Or would you never highlight the line number and one screen line?
Looking at this currently. It is a bit more effort than initially
thought, because the `win_line` has changed quite a bit in the last
couple of years. Currently I am implementing the screenline option for
the `'cursorlineopt'`. Is there any reason besides
backwards-compatibility to not have the cursorline always work on
screen lines?
I assume some users will like the whole line the be highlighted, so that
it's easy to see where it starts and ends. Some people would have a
slightly differently colored background, so it doesn't stand out so
much.
hi CursorLine cterm=NONE ctermbg=254
…--
"Marriage is when a man and woman become as one; the trouble starts
when they try to decide which one"
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
Problem: 'cursorline' always highlights the whole line.
Solution: Add 'cursorlineopt' to specify what is highlighted.
(closes vim#4693)
…5161) Problem: 'cursorline' always highlights the whole line. Solution: Add 'cursorlineopt' to specify what is highlighted. (closes vim/vim#4693) vim/vim@410e98a
…ovim#15161) Problem: 'cursorline' always highlights the whole line. Solution: Add 'cursorlineopt' to specify what is highlighted. (closes vim/vim#4693) vim/vim@410e98a
The continuation of https://groups.google.com/forum/#!topic/vim_dev/dQ-5znirV4Y
I created this pull-req in order to update the patch and test on CI.
Summary:
'cursorlineopt'changes the behavior of'cursorline'.'cursorlineopt'accepts one of the following string values:line: Highlight the screen line of the cursor withCursorLine.number: Highlight only the line number of the cursor withCursorLineNr.both(default):lineandnumber. This is the current behavior.