forked from aniani/vim
patch 9.1.0759: screenpos() may return invalid position
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: #15792 closes: #15803 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -6737,6 +6737,11 @@ win_copy_options(win_T *wp_from, win_T *wp_to)
|
||||
void
|
||||
after_copy_winopt(win_T *wp)
|
||||
{
|
||||
// Set w_leftcol or w_skipcol to zero.
|
||||
if (wp->w_p_wrap)
|
||||
wp->w_leftcol = 0;
|
||||
else
|
||||
wp->w_skipcol = 0;
|
||||
#ifdef FEAT_LINEBREAK
|
||||
briopt_check(wp);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user