aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/options.txt5
-rw-r--r--src/nvim/screen.c2
-rw-r--r--test/functional/ui/highlight_spec.lua24
3 files changed, 27 insertions, 4 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 188f7fc2e2..ec0f119033 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -3698,9 +3698,8 @@ 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 'wrap'
- is off and there is text preceding the character
- visible in the first column.
+ precedes:c Character to show in the first column, 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.
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index f4aa10ecf5..f107985df7 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -3763,7 +3763,7 @@ win_line (
*/
if (lcs_prec_todo != NUL
&& wp->w_p_list
- && (wp->w_p_wrap ? wp->w_skipcol > 0 : wp->w_leftcol > 0)
+ && (wp->w_p_wrap ? (wp->w_skipcol > 0 && row == 0) : wp->w_leftcol > 0)
&& filler_todo <= 0
&& draw_state > WL_NR
&& c != NUL) {
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index f40f658275..95a19aec81 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -657,6 +657,30 @@ describe("'listchars' highlight", function()
]])
end)
+ it("'listchar' with wrap", function()
+ screen:set_default_attr_ids({
+ [0] = {bold=true, foreground=Screen.colors.Blue},
+ })
+ feed_command('set wrap')
+ feed_command('set listchars=eol:¬,precedes:< list')
+ feed('90ia<esc>')
+ screen:expect([[
+ {0:<}aaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaa^a{0:¬} |
+ |
+ ]])
+ feed('0')
+ screen:expect([[
+ ^aaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaaaaaaaaaaaa|
+ aaaaaaaaaaaaaaaaaaaa|
+ |
+ ]])
+ end)
+
it("'listchar' in visual mode", function()
screen:set_default_attr_ids({
[1] = {background=Screen.colors.Grey90},