Bug 317964 - Cursor won't move forward to the next instance when using ^, $, or ^$ and regex
Summary: Cursor won't move forward to the next instance when using ^, $, or ^$ and regex
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: search (other bugs)
Version First Reported In: 3.10.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 342209 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-07 04:22 UTC by Woodsman
Modified: 2020-11-03 21:23 UTC (History)
4 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 Woodsman 2013-04-07 04:22:10 UTC
Using ^, $, and ^$ and setting the find dialog to use regex, the cursor won't move to the next instance of the regex when pressing the Repeat Find keyboard shortcut or using the Next button.

Reproducible: Always

Steps to Reproduce:
1. Set the Find dialog to regex
2. Search for ^, $, or ^$
3. The cursor moves to the first instance
4. Press the Repeat Find keyboard shortcut or press the dialog Next button
Actual Results:  
The cursor won't move forward.

Expected Results:  
The cursor should move forward.

Add additional information to the regex search and the cursor moves forward just fine. For exampe, ^[a-z] or [a-z]$.

Only when ^, $ or ^$ are used by themselves does the cursor refuse to move forward to find the next instance.
Comment 1 Askar Safin 2014-12-25 20:12:21 UTC
*** Bug 342209 has been marked as a duplicate of this bug. ***
Comment 2 Askar Safin 2014-12-25 20:15:19 UTC
The bug also reproducible with ^[^#]*$ , when it match empty line.
It seems that this bug related to any regex which match empty string
Comment 3 bunu 2014-12-25 20:23:22 UTC
[I am a GCI student]

A strange thing I noticed: It actually works when searching backwards(pressing the previous button)
Comment 4 Myriam Schweingruber 2014-12-29 13:21:32 UTC
Changing status
Comment 5 Darren Lissimore 2017-09-19 08:24:59 UTC
Still get the same interesting behavior - with Kate 17.08.1 . 
Searching using ^  and it works when searching backwards but not forwards.
Comment 6 Justin Zobel 2020-11-02 02:24:33 UTC
This appears fixed. I'm no regex expert but ^ found the start of each line, $ the end and ^$ only blank lines.

Can you please test and confirm the bug is now resolved, thanks.
Comment 7 Askar Safin 2020-11-03 13:37:32 UTC
The bug is not reproducible in kate in latest debian sid. (Kate 20.08.2)
Comment 8 Justin Zobel 2020-11-03 21:23:34 UTC
Thanks Askar, I'll mark this bug as resolved, if anyone is still experiencing the issue please reopen with further information if possible.