Bug 418486 - gk and gj commands do not work with regular arrow keys
Summary: gk and gj commands do not work with regular arrow keys
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: Vi Input Mode (other bugs)
Version First Reported In: 19.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-04 22:24 UTC by Mikhail Zolotukhin
Modified: 2020-03-12 22:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.69
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Zolotukhin 2020-03-04 22:24:36 UTC
SUMMARY
gk and gj commands do not work when invoked via regular arrow keys (g<Up> or g<Down>)

STEPS TO REPRODUCE
1. Open a text with long paragraphs
2. Try to move cursor in normal mode with g<Up> or g<Down>


OBSERVED RESULT
Cursor does not move

EXPECTED RESULT
Cursor moves just like when using gk or gj commands (they are working)
Comment 1 Christoph Cullmann 2020-03-12 22:21:25 UTC
Git commit 736844969d2b6698d235121a3bb5513f601fb7ae by Christoph Cullmann, on behalf of Mikhail Zolotukhin.
Committed on 12/03/2020 at 21:57.
Pushed by cullmann into branch 'master'.

[VIM Mode] Add g<up> g<down> commands

Summary:
Add twin commands for `gj` and `gk` for usage with standard
arrow keys.
FIXED-IN: 5.69

Test Plan:
1. Open document with large sentences, that span across multiple visual lines in Kate and use `gj` and `gk` commands in normal mode to move inside a line.
2. Use `g<down>` and `g<up>` commands - the result must be the same, as using `gj` and `gk` commands.
3. Repeat the same for `visual` mode.

Reviewers: #kate, #frameworks

Subscribers: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D27928

M  +25   -0    autotests/src/vimode/keys.cpp
M  +2    -0    src/vimode/modes/normalvimode.cpp
M  +2    -0    src/vimode/modes/visualvimode.cpp

https://commits.kde.org/ktexteditor/736844969d2b6698d235121a3bb5513f601fb7ae