mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
vim-patch:9.1.0759: screenpos() may return invalid position (#30681)
Problem: screenpos() may return invalid position
after switching buffers (Greg Hurrell)
Solution: reset w_leftcol if wrapping has been set
after copying wrap option
fixes: vim/vim#15792
closes: vim/vim#15803
b065a10e24
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -5096,6 +5096,12 @@ void clear_winopt(winopt_T *wop)
|
||||
|
||||
void didset_window_options(win_T *wp, bool valid_cursor)
|
||||
{
|
||||
// Set w_leftcol or w_skipcol to zero.
|
||||
if (wp->w_p_wrap) {
|
||||
wp->w_leftcol = 0;
|
||||
} else {
|
||||
wp->w_skipcol = 0;
|
||||
}
|
||||
check_colorcolumn(wp);
|
||||
briopt_check(wp);
|
||||
fill_culopt_flags(NULL, wp);
|
||||
|
Reference in New Issue
Block a user