summaryrefslogtreecommitdiffstats
path: root/src/move.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-11-09 23:26:40 +0100
committerBram Moolenaar <Bram@vim.org>2019-11-09 23:26:40 +0100
commitee85702c10495041791f728e977b86005c4496e8 (patch)
treead3a4d7d4d477299da5349d8b9d234243ca33d66 /src/move.c
parentb0745b221d284e381f1bd4b591cd68ea54b6a51d (diff)
patch 8.1.2281: 'showbreak' cannot be set for one windowv8.1.2281
Problem: 'showbreak' cannot be set for one window. Solution: Make 'showbreak' global-local.
Diffstat (limited to 'src/move.c')
-rw-r--r--src/move.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/move.c b/src/move.c
index d6b1c2636f..484b931abf 100644
--- a/src/move.c
+++ b/src/move.c
@@ -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
}