mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 03:28:33 +00:00
vim-patch:8.1.2281: 'showbreak' cannot be set for one window
Problem: 'showbreak' cannot be set for one window. Solution: Make 'showbreak' global-local.ee85702c10
Change in oneleft() is N/A as the relevant condition was removed (has_mbyte is always true for Nvim, so the condition was always false; see commit73dc9e9
). Use wp over curwin for curs_columns(). Required for v8.2.2903 (otherwise test fails as it'll leave the global option set). N/A patches for version.c: vim-patch:8.1.2283: missed on use of p_sbr Problem: Missed on use of p_sbr. Solution: Add missing p_sbr change.91e22eb6e0
Already ported in commit43a874a
.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user