diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-11-09 23:26:40 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-11-09 23:26:40 +0100 |
commit | ee85702c10495041791f728e977b86005c4496e8 (patch) | |
tree | ad3a4d7d4d477299da5349d8b9d234243ca33d66 /src/normal.c | |
parent | b0745b221d284e381f1bd4b591cd68ea54b6a51d (diff) | |
download | vim-git-ee85702c10495041791f728e977b86005c4496e8.tar.gz |
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/normal.c')
-rw-r--r-- | src/normal.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/normal.c b/src/normal.c index c20c072fd..76b1fa064 100644 --- a/src/normal.c +++ b/src/normal.c @@ -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 |