diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-23 10:12:00 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-08-23 13:17:17 +0800 |
commit | a1d71ad55e0f7149f284178b2d04ac78263b09ff (patch) | |
tree | b20f28212e0fd952a046d0e4150c7c26e54336fc /src/nvim/edit.c | |
parent | 3e80b39a8ef9d33090800642d25fadbd282af337 (diff) | |
download | rneovim-a1d71ad55e0f7149f284178b2d04ac78263b09ff.tar.gz rneovim-a1d71ad55e0f7149f284178b2d04ac78263b09ff.tar.bz2 rneovim-a1d71ad55e0f7149f284178b2d04ac78263b09ff.zip |
vim-patch:9.0.1783: Display issues with virt text smoothscroll and showbreak
Problem: Wrong display with wrapping virtual text or unprintable chars,
'showbreak' and 'smoothscroll'.
Solution: Don't skip cells taken by 'showbreak' in screen lines before
"w_skipcol". Combined "n_skip" and "skip_cells".
closes: vim/vim#12597
https://github.com/vim/vim/commit/b557f4898208105b674df605403cac1b1292707b
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 915399ec78..869b226856 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -232,7 +232,8 @@ static void insert_enter(InsertState *s) may_trigger_modechanged(); stop_insert_mode = false; - // need to position cursor again when on a TAB + // need to position cursor again when on a TAB and + // when on a char with inline virtual text if (gchar_cursor() == TAB || curbuf->b_virt_text_inline > 0) { curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL); } @@ -3471,7 +3472,8 @@ static bool ins_esc(long *count, int cmdchar, bool nomove) State = MODE_NORMAL; may_trigger_modechanged(); - // need to position cursor again when on a TAB + // need to position cursor again when on a TAB and + // when on a char with inline virtual text if (gchar_cursor() == TAB || curbuf->b_virt_text_inline > 0) { curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL); } |