0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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 #4969)
This commit is contained in:
Bram Moolenaar
2019-09-24 22:47:46 +02:00
parent 053f712ef2
commit 03ac52fc02
3 changed files with 26 additions and 2 deletions

View File

@@ -3406,8 +3406,8 @@ nv_screengo(oparg_T *oap, int dir, long dist)
{
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
{