[geany/geany-plugins] 59db92: vimode: Fix goto_down with line wrapping
pcworld
git-noreply at xxxxx
Sun Aug 12 08:46:08 UTC 2018
Branch: refs/heads/master
Author: pcworld <0188801 at gmail.com>
Committer: pcworld <0188801 at gmail.com>
Date: Thu, 31 May 2018 19:47:25 UTC
Commit: 59db92abc07a127e337ac848ca6ffee3788ed65f
https://github.com/geany/geany-plugins/commit/59db92abc07a127e337ac848ca6ffee3788ed65f
Log Message:
-----------
vimode: Fix goto_down with line wrapping
SCI_LINEDOWN goes down only one display line, hence when line wrapping
was enabled and a line wrapped over more than two lines, it was
impossible to go to the next actual line when pressing j.
Note that this still doesn't emulate vim behavior correctly where
caret-x position is saved for actual lines and not display lines. But
this change at least makes j go the next line when wrapping is enabled.
Modified Paths:
--------------
vimode/src/cmds/motion.c
Modified: vimode/src/cmds/motion.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -78,7 +78,7 @@ static void goto_down(CmdParams *p, gint num)
/* see cmd_goto_up() for explanation */
one_above = p->line + num - 1;
one_above = one_above < last_line ? one_above : last_line - 1;
- pos = SSM(p->sci, SCI_POSITIONFROMLINE, one_above, 0);
+ pos = SSM(p->sci, SCI_GETLINEENDPOSITION, one_above, 0);
SET_POS_NOX(p->sci, pos, FALSE);
SSM(p->sci, SCI_LINEDOWN, 0, 0);
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Plugins-Commits
mailing list