Mercurial > vim
comparison src/drawscreen.c @ 21590:5f4a188dead8 v8.2.1345
patch 8.2.1345: Redraw error when using visual block and scroll
Commit: https://github.com/vim/vim/commit/f8992d47cd50494c64bb733329067c9de3c75200
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 1 19:14:13 2020 +0200
patch 8.2.1345: Redraw error when using visual block and scroll
Problem: Redraw error when using visual block and scroll.
Solution: Add check for w_topline. ( closes https://github.com/vim/vim/issues/6597)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Aug 2020 19:15:03 +0200 |
parents | 304015471ae9 |
children | 7fb29e719d79 |
comparison
equal
deleted
inserted
replaced
21589:a38f99a23aa8 | 21590:5f4a188dead8 |
---|---|
1657 #ifdef FEAT_DIFF | 1657 #ifdef FEAT_DIFF |
1658 && !wp->w_botfill && !wp->w_old_botfill | 1658 && !wp->w_botfill && !wp->w_old_botfill |
1659 #endif | 1659 #endif |
1660 ) | 1660 ) |
1661 { | 1661 { |
1662 if (mod_top != 0 && wp->w_topline == mod_top) | 1662 if (mod_top != 0 |
1663 { | 1663 && wp->w_topline == mod_top |
1664 // w_topline is the first changed line, the scrolling will be done | 1664 && (!wp->w_lines[0].wl_valid |
1665 // further down. | 1665 || wp->w_topline == wp->w_lines[0].wl_lnum)) |
1666 { | |
1667 // w_topline is the first changed line and window is not scrolled, | |
1668 // the scrolling from changed lines will be done further down. | |
1666 } | 1669 } |
1667 else if (wp->w_lines[0].wl_valid | 1670 else if (wp->w_lines[0].wl_valid |
1668 && (wp->w_topline < wp->w_lines[0].wl_lnum | 1671 && (wp->w_topline < wp->w_lines[0].wl_lnum |
1669 #ifdef FEAT_DIFF | 1672 #ifdef FEAT_DIFF |
1670 || (wp->w_topline == wp->w_lines[0].wl_lnum | 1673 || (wp->w_topline == wp->w_lines[0].wl_lnum |