Mercurial > vim
diff src/normal.c @ 18154:5e10ee16f4b4 v8.1.2072
patch 8.1.2072: "gk" moves to start of line instead of upwards
Commit: https://github.com/vim/vim/commit/03ac52fc025790c474030ea556cec799400aa046
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 24 22:47:46 2019 +0200
patch 8.1.2072: "gk" moves to start of line instead of upwards
Problem: "gk" moves to start of line instead of upwards.
Solution: Fix off-by-one error. (Christian Brabandt, closes https://github.com/vim/vim/issues/4969)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 24 Sep 2019 23:00:05 +0200 |
parents | 1868ec23360e |
children | e0ec4cd7a865 |
line wrap: on
line diff
--- a/src/normal.c +++ b/src/normal.c @@ -3406,8 +3406,8 @@ nv_screengo(oparg_T *oap, int dir, long { if (dir == BACKWARD) { - if ((long)curwin->w_curswant >= width2) - /* move back within line */ + if ((long)curwin->w_curswant > width2) + // move back within line curwin->w_curswant -= width2; else {