Bug 353332 - No long able to save with CTRL-S in VI mode
Summary: No long able to save with CTRL-S in VI mode
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: Vi Input Mode (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-29 18:41 UTC by David Jones
Modified: 2016-06-18 08:52 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Jones 2015-09-29 18:41:54 UTC
I used to be able to save from VI mode using CTRL-S. Since updating to Frameworks 5, and the respective version of Kate, this no longer works. I tried Changing the key mappings in the VI mode configuration, but there doesn't seem to be any documentation how to do this.

Reproducible: Always

Steps to Reproduce:
1. Enter VI mode
2. Type some text.
3. Press CTRL-S. 

Actual Results:  
Nothing happens.

Expected Results:  
Save changes.
Comment 1 Michal Humpula 2015-10-10 21:31:30 UTC
Hi David, the Ctrl+S shortcut should be entirely possible to use in vi-mode. Can you try with the clean configuration? Is Ctrl+S shortcut configured in shortcuts? Do you have some vi-mode mappings?
Comment 2 Michal Humpula 2015-10-25 08:59:15 UTC
I can reproduce the issue after upgrade to Qt5.5.
Comment 3 David Jones 2016-03-15 22:50:41 UTC
Sorry about the long delay. No, I don't have any mappings. I tried configuring one to make this work, but I couldn't find any documentation on how to do the mappings. They seem to be slightly different from vimrc. 

I'm not sure what you mean by a clean configuration. Do you mean resetting everything to the default values?
Comment 4 Simon St James 2016-06-14 19:29:49 UTC
Unfortunately, Qt 5.5 introduced an overhaul of the shortcut system that broke one "feature" of Qt that we relied upon (that directly replaying a sequence of QKeyEvents - such as Ctrl+S - onto a widget would trigger any shortcuts that the sequence of keys would normally trigger).

I have a local patch that works around the issue as best I can (though is still not optimal - restoring this old - but undocumented and perhaps unintended - feature of Qt is necessary for that), but it's based against a big refactoring of emulated command bar which I'd have to get tidied up and committed first.  I'll see if I can do that tomorrow.

@Michal Hey :) Would you be happy to review a sequence of patches?
Comment 5 Simon St James 2016-06-15 15:12:06 UTC
A patch is up for review here:

https://phabricator.kde.org/D1894

it depends on 

https://phabricator.kde.org/D1892
Comment 6 Michal Humpula 2016-06-16 05:21:49 UTC
Hi @Simon, I would be happy to do the review. I was too lazy to fix it, because I could only imagine the complete rework of key input in vimode in order to fix it.
Comment 7 Simon St James 2016-06-18 08:52:49 UTC
Fixed as best as I can in https://quickgit.kde.org/?p=ktexteditor.git&a=commitdiff&h=025edb11ca9b0fa3685802e6c9cb608a4daa7911.

Remaining annoyances:  shortcuts won't be replayed in "repeat last change"/ macros; the most important example of this is if you insert/ edit some text and use ctrl+v to paste, then the paste won't be included if you repeat with "." (similarly, if you use ctrl+v to paste in a macro).  Workaround:

imap <c-v> <c-r>+