changeset 30950:6d2095a8499d v9.0.0809

patch 9.0.0809: test for job writing to buffer fails Commit: https://github.com/vim/vim/commit/63c84731c1802bac36c1d1a82b3ef5960b35b089 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 20 21:14:19 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 20 Oct 2022 22:15:04 +0200
parents eff8e7d8d825
children f2dd117ca94c
files src/evalbuffer.c src/version.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/evalbuffer.c
+++ b/src/evalbuffer.c
@@ -571,10 +571,13 @@ f_deletebufline(typval_T *argvars, typva
 	    {
 		if (wp->w_cursor.lnum > last)
 		    wp->w_cursor.lnum -= count;
-		else if (wp->w_cursor.lnum> first)
+		else if (wp->w_cursor.lnum > first)
 		    wp->w_cursor.lnum = first;
 		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_valid = 0;
+		if (wp->w_cursor.lnum <= wp->w_topline)
+		    wp->w_topline = 1;
 	    }
 	check_cursor_col();
 	deleted_lines_mark(first, count);
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    809,
+/**/
     808,
 /**/
     807,