diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-13 07:33:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 07:33:24 +0800 |
commit | 86458dde0e451dc1d59f16f1d00f2abeb8288ac9 (patch) | |
tree | 9885f56297ea544d9d0040af7921b88f0e9185b0 /src | |
parent | 2493fd020d6f294c78a87b0f7f35c0398b248f1f (diff) | |
download | rneovim-86458dde0e451dc1d59f16f1d00f2abeb8288ac9.tar.gz rneovim-86458dde0e451dc1d59f16f1d00f2abeb8288ac9.tar.bz2 rneovim-86458dde0e451dc1d59f16f1d00f2abeb8288ac9.zip |
vim-patch:9.1.0103: 'breakindentopt' "min" not correct with 'signcolumn' (#27451)
Problem: 'breakindentopt' "min" works incorrectly with 'signcolumn'.
Solution: Use win_col_off() and win_col_off2().
(zeertzjq)
closes: vim/vim#14014
https://github.com/vim/vim/commit/f0a9d65e0a1d693cdfa964aa72de5b93b4cacdea
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/indent.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c index 279ccd7f9c..14247b6d86 100644 --- a/src/nvim/indent.c +++ b/src/nvim/indent.c @@ -817,10 +817,7 @@ int get_breakindent_win(win_T *wp, char *line) static char *prev_flp = NULL; // cached formatlistpat value int bri = 0; // window width minus window margin space, i.e. what rests for text - const int eff_wwidth = wp->w_width_inner - - ((wp->w_p_nu || wp->w_p_rnu) - && (vim_strchr(p_cpo, CPO_NUMCOL) == NULL) - ? number_width(wp) + 1 : 0); + const int eff_wwidth = wp->w_width_inner - win_col_off(wp) + win_col_off2(wp); // In list mode, if 'listchars' "tab" isn't set, a TAB is displayed as ^I. const bool no_ts = wp->w_p_list && wp->w_p_lcs_chars.tab1 == NUL; |