diff options
author | chentau <tchen1998@gmail.com> | 2021-04-02 14:01:13 -0700 |
---|---|---|
committer | chentau <tchen1998@gmail.com> | 2021-04-02 16:21:46 -0700 |
commit | 7602c560508de35c9e211ecc732fda0ff3c06923 (patch) | |
tree | aa115e827ecf9db4f50ae1889a1a356ec4a91144 /src/nvim/edit.c | |
parent | dde89730b453fd2b84860e58bb8893c92417128b (diff) | |
download | rneovim-7602c560508de35c9e211ecc732fda0ff3c06923.tar.gz rneovim-7602c560508de35c9e211ecc732fda0ff3c06923.tar.bz2 rneovim-7602c560508de35c9e211ecc732fda0ff3c06923.zip |
extmark: fixes for noexpandtab and retab
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 49bd170bcd..be0ab33d08 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -8787,10 +8787,6 @@ static bool ins_tab(void) getvcol(curwin, &fpos, &vcol, NULL, NULL); getvcol(curwin, cursor, &want_vcol, NULL, NULL); - // save start of changed region for extmark_splice - int start_row = fpos.lnum; - colnr_T start_col = fpos.col; - // Use as many TABs as possible. Beware of 'breakindent', 'showbreak' // and 'linebreak' adding extra virtual columns. while (ascii_iswhite(*ptr)) { @@ -8841,8 +8837,8 @@ static bool ins_tab(void) } } if (!(State & VREPLACE_FLAG)) { - extmark_splice_cols(curbuf, start_row - 1, start_col, - cursor->col - start_col, fpos.col - start_col, + extmark_splice_cols(curbuf, fpos.lnum - 1, change_col, + cursor->col - change_col, fpos.col - change_col, kExtmarkUndo); } } |