Skip to content

Fix the extended search mode - #1182

Open
CyrilB1531 wants to merge 1 commit into
dail8859:masterfrom
CyrilB1531:fix/extended-search
Open

CyrilB1531 wants to merge 1 commit into
dail8859:masterfrom
CyrilB1531:fix/extended-search

Conversation

@CyrilB1531

Copy link
Copy Markdown
Contributor

In Extended mode the search text was never converted: the converted text was discarded and the Finder searched for the raw "\t", "\n"... Find, Count, Find All, Mark and Replace now search for the converted text.

The conversion is now done in a single pass, so an escaped backslash works ("\t" finds the text "\t"), "\0" gives a null character instead of an empty string, and unknown or incomplete sequences are kept as is. It also supports the character codes \xHH, \uHHHH, \oNNN, \dNNN and \bNNNNNNNN.

Matches are now searched in the target instead of with SCI_FINDTEXT, which takes a null terminated string, so null characters can be found by Count, Find All, Mark and Replace All as well.

Fixes #1181

In Extended mode the search text was never converted: the converted
text was discarded and the Finder searched for the raw "\t", "\n"...
Find, Count, Find All, Mark and Replace now search for the converted
text.

The conversion is now done in a single pass, so an escaped backslash
works ("\\t" finds the text "\t"), "\0" gives a null character instead
of an empty string, and unknown or incomplete sequences are kept as is.
It also supports the character codes \xHH, \uHHHH, \oNNN, \dNNN and
\bNNNNNNNN.

Matches are now searched in the target instead of with SCI_FINDTEXT,
which takes a null terminated string, so null characters can be found
by Count, Find All, Mark and Replace All as well.

Fixes dail8859#1181
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extended search mode does not find escape sequences (\t, \n, \r...)

1 participant