aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/buffer.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-02-16 18:32:38 +0100
committerGitHub <noreply@github.com>2021-02-16 18:32:38 +0100
commit772421f6b17f0d1e1a1124840aed3510c16c55c2 (patch)
treee27a3d1683416d090646a3d8e0bfa290919de3ec /src/nvim/api/buffer.c
parent7250d521c5cbc2186630432c6cc08c524c5eaf8e (diff)
parent563d7b694bc89782c83f6c8ffee2a80d9fdbaabc (diff)
downloadrneovim-772421f6b17f0d1e1a1124840aed3510c16c55c2.tar.gz
rneovim-772421f6b17f0d1e1a1124840aed3510c16c55c2.tar.bz2
rneovim-772421f6b17f0d1e1a1124840aed3510c16c55c2.zip
Merge pull request #13692 from mjlbach/fix_cursor_respect_current_line
fix_cursor: do not change line number when edit will not impact cursor row
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r--src/nvim/api/buffer.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index bd336a2b3d..0e97b36506 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -1930,7 +1930,6 @@ static void fix_cursor(linenr_T lo, linenr_T hi, linenr_T extra)
curwin->w_cursor.lnum += extra;
check_cursor_col();
} else if (extra < 0) {
- curwin->w_cursor.lnum = lo;
check_cursor();
} else {
check_cursor_col();