mirror of
https://github.com/neovim/neovim.git
synced 2026-07-15 13:50:33 +00:00
vim-patch:8.1.2060: "precedes" in 'listchars' not used properly
(Credit: Zach Wegner, https://github.com/neovim/neovim/pull/11034)
Problem: "precedes" in 'listchars' not used properly.
Solution: Correctly handle the "precedes" char in list mode for long lines.
bffba7f704
This commit is contained in:
@@ -3698,8 +3698,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
off and the line continues beyond the right of the
|
||||
screen.
|
||||
*lcs-precedes*
|
||||
precedes:c Character to show in the first column, when there is
|
||||
text preceding the character visible in the first column.
|
||||
precedes:c Character to show in the first visible column of the
|
||||
physical line, when there is text preceding the
|
||||
character visible in the first column.
|
||||
*lcs-conceal*
|
||||
conceal:c Character to show in place of concealed text, when
|
||||
'conceallevel' is set to 1. A space when omitted.
|
||||
|
||||
@@ -3770,11 +3770,9 @@ win_line (
|
||||
char_attr = hl_combine_attr(char_attr, extra_attr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle the case where we are in column 0 but not on the first
|
||||
* character of the line and the user wants us to show us a
|
||||
* special character (via 'listchars' option "precedes:<char>".
|
||||
*/
|
||||
// Handle the case where we are in column 0 but not on the first
|
||||
// character of the line and the user wants us to show us a
|
||||
// special character (via 'listchars' option "precedes:<char>".
|
||||
if (lcs_prec_todo != NUL
|
||||
&& wp->w_p_list
|
||||
&& (wp->w_p_wrap ? (wp->w_skipcol > 0 && row == 0) : wp->w_leftcol > 0)
|
||||
|
||||
@@ -42,6 +42,7 @@ endfunction
|
||||
function! NewWindow(height, width) abort
|
||||
exe a:height . 'new'
|
||||
exe a:width . 'vsp'
|
||||
set winfixwidth winfixheight
|
||||
redraw!
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user