aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-02 19:42:31 +0800
committerGitHub <noreply@github.com>2023-05-02 19:42:31 +0800
commit808752f1b09d2f03af5b58167602fef8320c11dc (patch)
tree0cf72ae00bd1b08053daee0ede8aa5495be704f0 /src/nvim/edit.c
parentfba18a3b62310f4535d979a05288101b9af2ef50 (diff)
parent5b111a8f00f8dbe458a3d437c9f06c9419d24840 (diff)
downloadrneovim-808752f1b09d2f03af5b58167602fef8320c11dc.tar.gz
rneovim-808752f1b09d2f03af5b58167602fef8320c11dc.tar.bz2
rneovim-808752f1b09d2f03af5b58167602fef8320c11dc.zip
Merge pull request #23320 from luukvbaal/smoothscroll
feat(ui): add 'smoothscroll' option
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 0fb1102f4f..2078fc4251 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -193,7 +193,7 @@ static void insert_enter(InsertState *s)
}
}
- Insstart_textlen = (colnr_T)linetabsize(get_cursor_line_ptr());
+ Insstart_textlen = linetabsize_str(get_cursor_line_ptr());
Insstart_blank_vcol = MAXCOL;
if (!did_ai) {
@@ -2251,7 +2251,7 @@ int stop_arrow(void)
// right, except when nothing was inserted yet.
update_Insstart_orig = false;
}
- Insstart_textlen = (colnr_T)linetabsize(get_cursor_line_ptr());
+ Insstart_textlen = linetabsize_str(get_cursor_line_ptr());
if (u_save_cursor() == OK) {
arrow_used = false;
@@ -2449,6 +2449,7 @@ void beginline(int flags)
}
curwin->w_set_curswant = true;
}
+ adjust_skipcol();
}
// oneright oneleft cursor_down cursor_up
@@ -2490,6 +2491,7 @@ int oneright(void)
curwin->w_cursor.col += l;
curwin->w_set_curswant = true;
+ adjust_skipcol();
return OK;
}
@@ -2538,6 +2540,7 @@ int oneleft(void)
// if the character on the left of the current cursor is a multi-byte
// character, move to its first byte
mb_adjust_cursor();
+ adjust_skipcol();
return OK;
}