Bug 325466

Summary: VI input mode visual mode seems not the same with vim
Product: [Applications] kate Reporter: julee <julee.vv>
Component: Vi Input ModeAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: michal.humpula
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.13
Sentry Crash Report:

Description julee 2013-09-30 16:03:16 UTC
1. When switching from insert mode to visual mode by selecting text with mouse, I can single click anywhere to go back to insert mode with vi/vim. But with kate vi input mode, it goes back to normal mode. So everytime I have put down the mouse and press "i" to go back to insert mode.

2. In visual mode, select text  in visual mode with mouse,  the last word with background highlight seems not selected. This make me confuse when try to copy text by this.

Reproducible: Always
Comment 1 Michal Humpula 2013-11-29 19:52:04 UTC
Hi julee, thanks for report! I can confirm the first one (tested against gvim). The fix should be easy, though.

If the second one is still an issue, can you please post detailed description? Some text example or screenshot perhaps?
Comment 2 Michal Humpula 2013-11-30 11:48:07 UTC
Git commit 51e7911314f3fec043dd8222647b50d8b59f972c by Michal Humpula.
Committed on 29/11/2013 at 20:46.
Pushed by michalhumpula into branch 'master'.

vi-mode: return to correct mode from visual mode

adds KateViInputModeManager::getPreviousViMode() solve the issue

REVIEW: 114215

M  +7    -0    part/vimode/kateviinputmodemanager.cpp
M  +6    -0    part/vimode/kateviinputmodemanager.h
M  +4    -1    part/vimode/katevivisualmode.cpp
M  +13   -0    tests/vimode_test.cpp

http://commits.kde.org/kate/51e7911314f3fec043dd8222647b50d8b59f972c