Mercurial > vim
comparison src/window.c @ 30439:e3091fc473a1 v9.0.0555
patch 9.0.0555: scrolling with 'nosplitscroll' in callback changing curwin
Commit: https://github.com/vim/vim/commit/20e58561abc4116f3bfbafaef242d886dd77b303
Author: Luuk van Baal <luukvbaal@gmail.com>
Date: Fri Sep 23 12:57:09 2022 +0100
patch 9.0.0555: scrolling with 'nosplitscroll' in callback changing curwin
Problem: Scrolling with 'nosplitscroll' in callback changing curwin.
Solution: Invalidate w_cline_row in the right place. (Luuk van Baal,
closes #11185)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 23 Sep 2022 14:00:06 +0200 |
parents | 69ff2bd737a9 |
children | 6fa498af368d |
comparison
equal
deleted
inserted
replaced
30438:69be14b8733c | 30439:e3091fc473a1 |
---|---|
6358 win_fix_scroll(int resize) | 6358 win_fix_scroll(int resize) |
6359 { | 6359 { |
6360 win_T *wp; | 6360 win_T *wp; |
6361 linenr_T lnum; | 6361 linenr_T lnum; |
6362 | 6362 |
6363 skip_update_topline = TRUE; // avoid scrolling in curs_rows() | 6363 skip_update_topline = TRUE; // avoid scrolling in curs_columns() |
6364 FOR_ALL_WINDOWS(wp) | 6364 FOR_ALL_WINDOWS(wp) |
6365 { | 6365 { |
6366 // Skip when window height has not changed. | 6366 // Skip when window height has not changed. |
6367 if (wp->w_height != wp->w_prev_height) | 6367 if (wp->w_height != wp->w_prev_height) |
6368 { | 6368 { |
6376 // Bring the new cursor position to the bottom of the screen. | 6376 // Bring the new cursor position to the bottom of the screen. |
6377 wp->w_fraction = FRACTION_MULT; | 6377 wp->w_fraction = FRACTION_MULT; |
6378 scroll_to_fraction(wp, wp->w_prev_height); | 6378 scroll_to_fraction(wp, wp->w_prev_height); |
6379 wp->w_cursor.lnum = lnum; | 6379 wp->w_cursor.lnum = lnum; |
6380 } | 6380 } |
6381 else if (wp == curwin) | |
6382 wp->w_valid &= ~VALID_CROW; | |
6381 invalidate_botline_win(wp); | 6383 invalidate_botline_win(wp); |
6382 validate_botline_win(wp); | 6384 validate_botline_win(wp); |
6383 } | 6385 } |
6384 win_comp_scroll(wp); | 6386 win_comp_scroll(wp); |
6385 wp->w_prev_height = wp->w_height; | 6387 wp->w_prev_height = wp->w_height; |