summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-10-02 21:20:32 +0200
committerBram Moolenaar <Bram@vim.org>2018-10-02 21:20:32 +0200
commit7701f308565fdc7b5096a6597d9c3b63de0bbcec (patch)
treeecc3673dfe38d99a4664f1a1821cc90513bae8e4 /src/screen.c
parent4a5abbd6138240d109278fe1f0b45489d22f712d (diff)
downloadvim-git-7701f308565fdc7b5096a6597d9c3b63de0bbcec.tar.gz
patch 8.1.0449: when 'rnu' is set folded lines are not displayed correctlyv8.1.0449
Problem: When 'rnu' is set folded lines are not displayed correctly. (Vitaly Yashin) Solution: When only redrawing line numbers do draw folded lines. (closes #3484)
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/screen.c b/src/screen.c
index 4effa5286..01428c4da 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2176,7 +2176,14 @@ win_update(win_T *wp)
{
// 'relativenumber' set: The text doesn't need to be drawn, but
// the number column nearly always does.
- (void)win_line(wp, lnum, srow, wp->w_height, TRUE, TRUE);
+ fold_count = foldedCount(wp, lnum, &win_foldinfo);
+ if (fold_count != 0)
+ {
+ fold_line(wp, fold_count, &win_foldinfo, lnum, row);
+ --fold_count;
+ }
+ else
+ (void)win_line(wp, lnum, srow, wp->w_height, TRUE, TRUE);
}
// This line does not need to be drawn, advance to the next one.
@@ -3315,8 +3322,8 @@ win_line(
has_spell = TRUE;
extra_check = TRUE;
- /* Get the start of the next line, so that words that wrap to the next
- * line are found too: "et<line-break>al.".
+ /* Get the start of the next line, so that words that wrap to the
+ * next line are found too: "et<line-break>al.".
* Trick: skip a few chars for C/shell/Vim comments */
nextline[SPWORDLEN] = NUL;
if (lnum < wp->w_buffer->b_ml.ml_line_count)
@@ -3325,8 +3332,8 @@ win_line(
spell_cat_line(nextline + SPWORDLEN, line, SPWORDLEN);
}
- /* When a word wrapped from the previous line the start of the current
- * line is valid. */
+ /* When a word wrapped from the previous line the start of the
+ * current line is valid. */
if (lnum == checked_lnum)
cur_checked_col = checked_col;
checked_lnum = 0;