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)
diff --git a/src/normal.c b/src/normal.c
index adc7541..4db90d6 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -3406,8 +3406,8 @@
{
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
{