mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.1.2281: 'showbreak' cannot be set for one window
Problem: 'showbreak' cannot be set for one window. Solution: Make 'showbreak' global-local.
This commit is contained in:
@@ -1768,13 +1768,16 @@ clear_showcmd(void)
|
||||
{
|
||||
# ifdef FEAT_LINEBREAK
|
||||
char_u *saved_sbr = p_sbr;
|
||||
char_u *saved_w_sbr = curwin->w_p_sbr;
|
||||
|
||||
/* Make 'sbr' empty for a moment to get the correct size. */
|
||||
p_sbr = empty_option;
|
||||
curwin->w_p_sbr = empty_option;
|
||||
# endif
|
||||
getvcols(curwin, &curwin->w_cursor, &VIsual, &leftcol, &rightcol);
|
||||
# ifdef FEAT_LINEBREAK
|
||||
p_sbr = saved_sbr;
|
||||
curwin->w_p_sbr = saved_w_sbr;
|
||||
# endif
|
||||
sprintf((char *)showcmd_buf, "%ldx%ld", lines,
|
||||
(long)(rightcol - leftcol + 1));
|
||||
@@ -2577,8 +2580,8 @@ nv_screengo(oparg_T *oap, int dir, long dist)
|
||||
validate_virtcol();
|
||||
virtcol = curwin->w_virtcol;
|
||||
#if defined(FEAT_LINEBREAK)
|
||||
if (virtcol > (colnr_T)width1 && *p_sbr != NUL)
|
||||
virtcol -= vim_strsize(p_sbr);
|
||||
if (virtcol > (colnr_T)width1 && *get_showbreak_value(curwin) != NUL)
|
||||
virtcol -= vim_strsize(get_showbreak_value(curwin));
|
||||
#endif
|
||||
|
||||
if (virtcol > curwin->w_curswant
|
||||
|
Reference in New Issue
Block a user