In konsole search (Ctrl+Shift+F) to the right from the search field the two buttons Previous and Next have wrong labels. The first button has an arrow pointing up and label "Next" and searches upwards when pressed. The second button has an arrow pointing down and label "Previous" and searches downwards when pressed. Looks like the labels should be swapped. Reproducible: Always Steps to Reproduce: 1. In Konsole open search status bar (Ctrl+Shift+F) 2. Enter text in the field, that should be found when searched in the window. 3. Press Previous/Next buttons and observe the search direction. Actual Results: result is in the Details section Expected Results: Opposite
This is intended. The history starts at the bottom, because the lines at the top get discarded silently. Pressing "Next" gets you "deeper" into history, i.e. you get the next older result.
I find this labelling highly counter-intuitive, "Next" suggests the "later" result and it doesn't feel right the way it's done currently. It is the direct opposite of how any text editor works, and it is also the opposite of what several other terminal emulators do: both gnome-terminal and xfce4-terminal use "next" to go "down". As it is now I have to avoid reading the labels and just look at the arrows to avoid confusing myself. BWT I don't see how discarding has anything do with this. There's new output at the bottom, and when I'm looking for the "next" search result I want to go to the later-in-time, possibly just-appended one.
Which occurrence do you expect Konsole to find first? The oldest (at the top of the history) or the newest (at the bottom)?
I just noticed that if you switch the search direction, the arrows on the "Next" and "Previous" buttons change accordingly.
Thanks for pointing that out. However, the default is still the opposite of what everything else does and it goes back to searching backwards after I close and re-launch Konsole. Is there a way to switch the default so I don't have to switch each time?
You did not answer comment #3. Can you clarify what use case would justify finding the oldest entries first, instead of starting what you did recently?
Sure. I can think of several justifications for that: 1. Consistency with other editors and terminal emulators. 2. Coming back to a busy console I want to start at the earliest match. What I did most recently is usually either visible or accesible quickly using the command again with grep, it's the older matches that I'm interested in. 3. Actual use case: in a console dedicated to a live log output I'll sometimes clear the scrollback, perform a test, and the analyse the logs. It is confusing when the default direction of the search is backwards. 4. When looking for something in the context of something else, it is useful to use the fact that the current search position is maintained when a new search is performed. However, by default the second search will go backwards direction is again, surprising, and does not follow my usual "search for context, then search for something that happened *next*".
*** This bug has been marked as a duplicate of bug 332601 ***
*** Bug 376995 has been marked as a duplicate of this bug. ***
This is not duplicate of bug 332601. Forementioned bug is fixed by making search order configurable. This bug is about default search order for konsole part - and the one is still "reverse search" by default, which we claim in this bug to be counter-intuitive.