
Regex search: cannot find-prev; wrong pos for find-next
Regex search: cannot find-prev; wrong pos for find-next
Searching a text (say "local") with regex disabled works as expected. However, enabling regexes has two unhappy consequences: 1) "Find prev" is not functional anymore and (worse) b) "Find next" ALWAYS continues the search from the last found location and not from the caret, ie "Find next" has found a "local" in line 512, I then move down to line 1024 (with a "local" in the next line, 1025), "Find next" then jumps back to line 514 where there's also a "local". Disable regexes and all is well. 

By design?Alexey wrote:hm, it was made by design, but maybe I need to re-think this.


Hm, that's certainly a limitation. Of the two editors I know pretty well Geany can't search regexes backwards, Akelpad can. Does "not enabled" mean it could be enabled somehow or that it's not doable at all with the regex engine you are using? This is probably not a huge problem but it still leaves me scratching my head.Alexey wrote:"Find prev" is not enabled in regex engine, sorry
Well, searching with regex enabled is almost unusable as it is. The problem explained in my first post has another unhappy consequence: once a regex search has reached the end of the file there's no way (I could find) how I can ever restart the search in the beginning. What I have to do is go into the Find dialog, disable regexes and search for something non-regex once. This resets the search position for regexes. Then I have to re-enable regexes and can continue searching... this strange behaviour can't possibly be by design




Please try my fixes?
https://github.com/Alexey-T/CudaText/issues/2605
https://github.com/Alexey-T/CudaText/issues/2605