Skip to content

Commit 63c8473

Browse files
committed
patch 9.0.0809: test for job writing to buffer fails
Problem: Test for job writing to buffer fails. Solution: Correct w_topline when deleting a buffer line.
1 parent 6c8bc37 commit 63c8473

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/evalbuffer.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,10 +571,13 @@ f_deletebufline(typval_T *argvars, typval_T *rettv)
571571
{
572572
if (wp->w_cursor.lnum > last)
573573
wp->w_cursor.lnum -= count;
574-
else if (wp->w_cursor.lnum> first)
574+
else if (wp->w_cursor.lnum > first)
575575
wp->w_cursor.lnum = first;
576576
if (wp->w_cursor.lnum > wp->w_buffer->b_ml.ml_line_count)
577577
wp->w_cursor.lnum = wp->w_buffer->b_ml.ml_line_count;
578+
wp->w_valid = 0;
579+
if (wp->w_cursor.lnum <= wp->w_topline)
580+
wp->w_topline = 1;
578581
}
579582
check_cursor_col();
580583
deleted_lines_mark(first, count);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ static char *(features[]) =
695695

696696
static int included_patches[] =
697697
{ /* Add new patch number below this line */
698+
/**/
699+
809,
698700
/**/
699701
808,
700702
/**/

0 commit comments

Comments
 (0)