Newlines in search and replace
-
- Posts: 13
- Joined: Sat Dec 22, 2007 8:41 pm
Newlines in search and replace
This is also a missing feature that makes some edits very tiresomeor next to impossible. I use a different editor to do these types of edits.
Aaron
Aaron
This feature has now been added to Zeus 
To get this feature just download the latest Zeus patch found here: http://www.zeusedit.com/forum/viewtopic.php?t=1790
Cheers Jussi

To get this feature just download the latest Zeus patch found here: http://www.zeusedit.com/forum/viewtopic.php?t=1790
Cheers Jussi
-
- Posts: 13
- Joined: Sat Dec 22, 2007 8:41 pm
-
- Posts: 13
- Joined: Sat Dec 22, 2007 8:41 pm
Because Zeus holds each line in a separate line buffer and does not actually store the \n line feed character, when a \n search is requested it creates a special search line buffer made up of a number of concatenated lines separated by line feeds.
To determine how many lines need to be concatenated it counts the number of \n characters specified in the search string.
So for example, because the \n+ search string contains one \n, then only two lines will be concatenated, and hence on two lines will be found.
As for the \n* search, I am not sure what is going on there, since the regexp engine seams to be always return any single character rather than zero or more line feeds
This looks like a bug in the regexp engine itself, since the a* search seems to return a similarly broken result
Cheers Jussi
To determine how many lines need to be concatenated it counts the number of \n characters specified in the search string.
So for example, because the \n+ search string contains one \n, then only two lines will be concatenated, and hence on two lines will be found.
As for the \n* search, I am not sure what is going on there, since the regexp engine seams to be always return any single character rather than zero or more line feeds

This looks like a bug in the regexp engine itself, since the a* search seems to return a similarly broken result

Cheers Jussi
-
- Posts: 13
- Joined: Sat Dec 22, 2007 8:41 pm
Hi Aaron,
I do understand your bug report, but because of the reasons describe above, there are limitations to what Zeus can do
So while it is not working as expected, it is working to design
Having said this, the situation can be improved by increasing the minimum size of the search line buffer, but the search will still be limited by design, meaning there will always be a situation where the search and replace does not work as expected.
Cheers Jussi
I do understand your bug report, but because of the reasons describe above, there are limitations to what Zeus can do

So while it is not working as expected, it is working to design

Having said this, the situation can be improved by increasing the minimum size of the search line buffer, but the search will still be limited by design, meaning there will always be a situation where the search and replace does not work as expected.
Cheers Jussi
The latest version should do a better job of handling the \n+ case 
The latest patch can be found here: http://www.zeusedit.com/forum/viewtopic.php?p=3976
Cheers Jussi

The latest patch can be found here: http://www.zeusedit.com/forum/viewtopic.php?p=3976
Cheers Jussi