Bug 451076 - Confirming search in VI-Input mode in insert mode creates a spurious linebreak before search result
Summary: Confirming search in VI-Input mode in insert mode creates a spurious linebrea...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: Vi Input Mode (show other bugs)
Version: 21.12.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-03 09:55 UTC by Andreas
Modified: 2022-03-07 22:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.93.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas 2022-03-03 09:55:45 UTC
SUMMARY

When confirming search in VI-Input mode with Enter a spurious linebreak is inserted before the search result.
That happens 

STEPS TO REPRODUCE
1. Enable VI-Input mode (with or without kate shortcuts overriding vim .
2. Put the editor in insert mode ("i") and type some text.
3. Perform a search for entered text selecting "Find" from the menu (not with "/" since you are still in input mode).
4. Confirm with enter to return to the editor window.

OBSERVED RESULT

Cursor is in editor window after a new linebreak. The search result follows.

EXPECTED RESULT

Cursor is in editor window in front of search result, but no new linebreak has been created.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Neon.

ADDITIONAL INFORMATION

None.
Comment 1 Bug Janitor Service 2022-03-07 21:42:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/313
Comment 2 Jyrki Gadinger 2022-03-07 22:16:22 UTC
Git commit 544659a0cfdd9afc545c18174063fd1c07f1c2d4 by Georg Gadinger.
Committed on 07/03/2022 at 21:39.
Pushed by cullmann into branch 'master'.

vimode: fix extra newline when using the "Find" action

M  +29   -0    autotests/src/vimode/modes.cpp
M  +5    -0    src/vimode/modes/insertvimode.cpp
M  +10   -0    src/vimode/modes/replacevimode.cpp

https://invent.kde.org/frameworks/ktexteditor/commit/544659a0cfdd9afc545c18174063fd1c07f1c2d4