diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2021-09-10 08:43:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-10 08:43:45 -0700 |
commit | 7525052270c4c5e62b9b5bc7dbc20b851f986900 (patch) | |
tree | 2e29d778af83871bed859d1301ecdd1bb09979cb /src/nvim/normal.c | |
parent | 0dcfd0e8d101389fb6a33a7e887114ea0c062648 (diff) | |
parent | 36aff87ab6a043a31c13daf4522843498b98c93f (diff) | |
download | rneovim-7525052270c4c5e62b9b5bc7dbc20b851f986900.tar.gz rneovim-7525052270c4c5e62b9b5bc7dbc20b851f986900.tar.bz2 rneovim-7525052270c4c5e62b9b5bc7dbc20b851f986900.zip |
Merge #15626 vim-patch:8.1.{2281,2283},8.2.{2903,3391,3397}
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 165629a6e0..74aaed87c1 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -3407,12 +3407,15 @@ void clear_showcmd(void) lines = bot - top + 1; if (VIsual_mode == Ctrl_V) { - char_u *saved_sbr = p_sbr; + char_u *const saved_sbr = p_sbr; + char_u *const 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; getvcols(curwin, &curwin->w_cursor, &VIsual, &leftcol, &rightcol); p_sbr = saved_sbr; + curwin->w_p_sbr = saved_w_sbr; snprintf((char *)showcmd_buf, SHOWCMD_BUFLEN, "%" PRId64 "x%" PRId64, (int64_t)lines, (int64_t)rightcol - leftcol + 1); } else if (VIsual_mode == 'V' || VIsual.lnum != curwin->w_cursor.lnum) { @@ -4141,8 +4144,8 @@ static bool nv_screengo(oparg_T *oap, int dir, long dist) */ validate_virtcol(); colnr_T virtcol = curwin->w_virtcol; - 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)); } if (virtcol > curwin->w_curswant |