aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZach Wegner <zwegner@gmail.com>2019-09-15 14:16:44 -0500
committerJustin M. Keyes <justinkz@gmail.com>2019-09-21 22:09:52 -0700
commit18e5869f56aab8a52d84185e5bd043799c36ae2d (patch)
tree9a9e3da150519344719ef555651488c3792cb73a /src
parent45447e3b647259d78434798ddd9c2ae245dcdbcc (diff)
downloadrneovim-18e5869f56aab8a52d84185e5bd043799c36ae2d.tar.gz
rneovim-18e5869f56aab8a52d84185e5bd043799c36ae2d.tar.bz2
rneovim-18e5869f56aab8a52d84185e5bd043799c36ae2d.zip
Fix "precedes" listchar behavior in wrap mode
Previously, the "precedes" character would be rendered on every row when w_skipcol > 0 (i.e., when viewing a single line longer than the entire screen), instead of just on the first row. Make sure to only render it on the first row in this case. Add a test for this behavior. Fix documentation for the "precedes" character, which erroneously stated that it was only active when wrap mode was off.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/screen.c2
1 files changed, 1 insertions, 1 deletions
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) {