1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2022-10-20 21:14:19 +01:00
parent 6c8bc37a10
commit 63c84731c1
2 changed files with 6 additions and 1 deletions

View File

@@ -571,10 +571,13 @@ f_deletebufline(typval_T *argvars, typval_T *rettv)
{ {
if (wp->w_cursor.lnum > last) if (wp->w_cursor.lnum > last)
wp->w_cursor.lnum -= count; wp->w_cursor.lnum -= count;
else if (wp->w_cursor.lnum> first) else if (wp->w_cursor.lnum > first)
wp->w_cursor.lnum = first; wp->w_cursor.lnum = first;
if (wp->w_cursor.lnum > wp->w_buffer->b_ml.ml_line_count) if (wp->w_cursor.lnum > wp->w_buffer->b_ml.ml_line_count)
wp->w_cursor.lnum = wp->w_buffer->b_ml.ml_line_count; wp->w_cursor.lnum = wp->w_buffer->b_ml.ml_line_count;
wp->w_valid = 0;
if (wp->w_cursor.lnum <= wp->w_topline)
wp->w_topline = 1;
} }
check_cursor_col(); check_cursor_col();
deleted_lines_mark(first, count); deleted_lines_mark(first, count);

View File

@@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
809,
/**/ /**/
808, 808,
/**/ /**/