Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
18153:15be611fcb05 | 18154:5e10ee16f4b4 |
---|---|
3404 | 3404 |
3405 while (dist--) | 3405 while (dist--) |
3406 { | 3406 { |
3407 if (dir == BACKWARD) | 3407 if (dir == BACKWARD) |
3408 { | 3408 { |
3409 if ((long)curwin->w_curswant >= width2) | 3409 if ((long)curwin->w_curswant > width2) |
3410 /* move back within line */ | 3410 // move back within line |
3411 curwin->w_curswant -= width2; | 3411 curwin->w_curswant -= width2; |
3412 else | 3412 else |
3413 { | 3413 { |
3414 /* to previous line */ | 3414 /* to previous line */ |
3415 if (curwin->w_cursor.lnum == 1) | 3415 if (curwin->w_cursor.lnum == 1) |