Mercurial > vim
comparison src/drawscreen.c @ 21877:7fb29e719d79 v8.2.1488
patch 8.2.1488: text does not scroll when inserting above first line
Commit: https://github.com/vim/vim/commit/9dc1917f42b23277e143fc58bbe27482b0b76bad
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 19 20:19:48 2020 +0200
patch 8.2.1488: text does not scroll when inserting above first line
Problem: Text does not scroll when inserting above first line.
Solution: Adjust off-by-one error. (Ken Takata, closes https://github.com/vim/vim/issues/6739)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 19 Aug 2020 20:30:04 +0200 |
parents | 5f4a188dead8 |
children | 4549133c1e77 |
comparison
equal
deleted
inserted
replaced
21876:43877f9603c1 | 21877:7fb29e719d79 |
---|---|
1660 ) | 1660 ) |
1661 { | 1661 { |
1662 if (mod_top != 0 | 1662 if (mod_top != 0 |
1663 && wp->w_topline == mod_top | 1663 && wp->w_topline == mod_top |
1664 && (!wp->w_lines[0].wl_valid | 1664 && (!wp->w_lines[0].wl_valid |
1665 || wp->w_topline == wp->w_lines[0].wl_lnum)) | 1665 || wp->w_topline <= wp->w_lines[0].wl_lnum)) |
1666 { | 1666 { |
1667 // w_topline is the first changed line and window is not scrolled, | 1667 // w_topline is the first changed line and window is not scrolled, |
1668 // the scrolling from changed lines will be done further down. | 1668 // the scrolling from changed lines will be done further down. |
1669 } | 1669 } |
1670 else if (wp->w_lines[0].wl_valid | 1670 else if (wp->w_lines[0].wl_valid |