mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -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:
@@ -988,6 +988,8 @@ curs_columns(
|
||||
/* long line wrapping, adjust curwin->w_wrow */
|
||||
if (curwin->w_wcol >= curwin->w_width)
|
||||
{
|
||||
char_u *sbr;
|
||||
|
||||
/* this same formula is used in validate_cursor_col() */
|
||||
n = (curwin->w_wcol - curwin->w_width) / width + 1;
|
||||
curwin->w_wcol -= n * width;
|
||||
@@ -997,8 +999,9 @@ curs_columns(
|
||||
/* When cursor wraps to first char of next line in Insert
|
||||
* mode, the 'showbreak' string isn't shown, backup to first
|
||||
* column */
|
||||
if (*p_sbr && *ml_get_cursor() == NUL
|
||||
&& curwin->w_wcol == (int)vim_strsize(p_sbr))
|
||||
sbr = get_showbreak_value(curwin);
|
||||
if (*sbr && *ml_get_cursor() == NUL
|
||||
&& curwin->w_wcol == (int)vim_strsize(sbr))
|
||||
curwin->w_wcol = 0;
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user