Bug 411923 - Search pattern is easily lost when the search pattern history is used
Summary: Search pattern is easily lost when the search pattern history is used
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: search (show other bugs)
Version: 20.08.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-14 20:29 UTC by David Hurka
Modified: 2021-02-19 09:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Hurka 2019-09-14 20:29:45 UTC
SUMMARY
In the search pattern input box (Ctrl+F or Ctrl+R), you can navigate in the search history with Up and Down arrow keys. Unfortunately, this discards the search pattern you are typing right at the moment.

STEPS TO REPRODUCE
1. Do some searches with the Find bar or Find & Replace bar.
2. Type a search pattern in this bar
3. Accidentally hit the Down arrow key

OBSERVED RESULT
The search pattern you just have typed is lost.

EXPECTED RESULT
With the Up arrow key the search pattern comes back. (Same behaviour as in Konsole.)

SOFTWARE/OS VERSIONS
Kate 19.08.0
KDE Neon 5.16
KDE Plasma Version: 5.16.3
KDE Frameworks Version: 5.61
Qt Version: 5.12.3
Comment 1 Justin Zobel 2020-10-30 04:17:29 UTC
David I've just tested this on kate from git master and when hitting the down arrow I am moved to a history item but if I hit the up arrow I am returned to my partially started search term.

Can you please retest and confirm if this is still an issue for you, thanks.
Comment 2 David Hurka 2020-10-30 11:21:52 UTC
Is still an issue. When I enter a search term, don’t trigger the search, press Down, then press Up, Up has no effect. The search term is lost. :(
Comment 3 Justin Zobel 2020-11-01 01:11:58 UTC
(In reply to David Hurka from comment #2)
> Is still an issue. When I enter a search term, don’t trigger the search,
> press Down, then press Up, Up has no effect. The search term is lost. :(

Can you please test this on a new user to confirm the issue is not some configuration or setting.

I have tested again on my laptop this time and cannot reproduce the issue, whatever I type in is still there after hitting down and then up arrow keys.
Comment 4 David Hurka 2020-11-01 11:45:26 UTC
It still happens with a new user.

Anyway, since I opened this bug, I have installed a fresh KDE Neon.

Now I have this:
Kate 20.08.2
KDE Neon 5.20.0
Frameworks: 5.75.0 per Info Center, 5.76.0 per Kate (probably because I have KWidgetsAddons from git master)
Qt 5.15.0

I use the Neo2 keyboard layout, but it happens with both layer 1 arrow keys and layer 4 arrow keys.
Comment 5 Justin Zobel 2020-11-01 23:22:38 UTC
(In reply to David Hurka from comment #4)
> It still happens with a new user.
> 
> Anyway, since I opened this bug, I have installed a fresh KDE Neon.
> 
> Now I have this:
> Kate 20.08.2
> KDE Neon 5.20.0
> Frameworks: 5.75.0 per Info Center, 5.76.0 per Kate (probably because I have
> KWidgetsAddons from git master)
> Qt 5.15.0
> 
> I use the Neo2 keyboard layout, but it happens with both layer 1 arrow keys
> and layer 4 arrow keys.

Are you able to please try with a standard QWERTY keyboard layout?
Comment 6 Bug Janitor Service 2020-11-16 04:33:43 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Kåre Särs 2020-11-16 06:07:29 UTC
Hi,

I can confirm this bug/wish in the builtin search.

The key part here is that you have not pressed enter before pressing key down. Pressing enter adds the current search to the history but pressing down just loads the first history item and discards the current search.

So the wish here would be that unfinished searches would be saved temporarily.
Comment 8 Bug Janitor Service 2021-01-29 13:20:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/94
Comment 9 Jan Paul Batrina 2021-02-19 09:53:30 UTC
Git commit c619b42203cd53551b6364da5e9b082c51c39305 by Jan Paul Batrina.
Committed on 18/02/2021 at 15:31.
Pushed by cullmann into branch 'master'.

Temporarily save unfinished search/replace text

The unsaved text can be accessed by pressing the up arrow key
right past the latest entry in the history and is only available
until the search bar is closed.

M  +32   -0    src/search/katesearchbar.cpp
M  +2    -0    src/search/katesearchbar.h

https://invent.kde.org/frameworks/ktexteditor/commit/c619b42203cd53551b6364da5e9b082c51c39305