Notepad3
Notepad3 copied to clipboard
Search Pattern display error with backslashes
ctrl+h and ctrl+f show same behaviour:
extract portable zip to new folder, enable "show linebreaks" ctrl+shift+9 example text is a few lines of "fdasCRLF" cursor at document beginning, no text selected
- ctrl+h / search+replace -> search box is empty + blue
- "transform backslashes" enabled
- search for \n -> all LF are selected
- close dialog, move cursor to clear selection(s)
- open again ctrl+h / search + replace
result: "Search String:" appears empty but in green color, but in fact has \n selected, as all LF markers in document are selected again, "find next" is clickable and moves to next LF ...
expected result: "Search String:" contains a visible "\n" and is green, or is empty and blue and "find next" is disabled and gray
older v5.20.915.1 shows \n with green background color, new 5.21.905.1 and 5.21.1109.1_rc show empty box with green background color
"Search String:" appears empty but in green color, but in fact has \n selected,
- The end of line
CRLF
is normally hidden and stands forCarridge Return
Line Feed
- The end of line
\r
is normally hidden and stands forreturn
orCarridge Return
- The end of line
\n
is normally hidden stands fornew line
orLine Feed
Examples in a Multi-lines selection:
Transform backslashes
is used to search on special characters:
ok, thanks, i have to admit i never tried that new toggle thing.
i found it in the changelog: [.914.1]- F/R Dialog: toggle "Esc Ctrl Chr", try reverse operation if no length change [.913.1]- Bad design: F/R dialog: remove auto Esc Ctrl Chr (changed to manual explicit).
so i was confused by this behavior:
- "use last search string but hide control chars on dialog open",
- "show control chars when a search pattern is selected in the select-box list"
i'd like some .ini option to enable "always show control chars in f/r dialog" for the behavior 1) to avoid the confusion/extra click, or, show control chars when the search pattern consist solely of control chars
@sky1ab : You are right, there are some inconsistencies in handling
Esc Ctrl Chr
-Toggle + Transform Backslashes
+ Save/Restore F/R-History
.
@hpwamr : No this one was not solved with latest PRs.
jumped from v5.20.915.1 to v5.21.1129.1 and the above problem re-appeared: "search string" green background and empty with content \r\n "replace with" white background and visible content \r\n with "tranform backslashes" enabled
have to click the top "esc ctrl char" to see search text same on Notepad3_5.22.1213.1_rc2
We missed a call of updating search results after pressing EscCtrlChr
.
General: Background coloring (green(found), blue(missing), red(RegExpr error).
Example: Search pattern "\r\n" or invisible CR LF
after pressing EscCtrlChr
:
- OK: "\r\n" only found (green) if "Transform backslashes" is active, sinde 4-byte sequence '\','r','\','n' is not part of the document.
- OK: pressing
EscCtrlChr
, turns the sequence into invisibleCR LF
which will be found in document (all EOLs) -> green (it is still in the input box, Ctrl+A,Ctrl-C will copy it to clipboard, Ctrl-V can paste into document) - OK: invisible
CR LF
will still be found, independent of pressing "Transform backslashes" since there are no backslashes to transform. - OK: Replace Text Box will never get a green, blue or red background color - it is going to replace findings, not to search for.
- OK: "Transform backslashes" also applies to Replace Text - either replace by 4-byte sequence '\','r','\','n' or by
CR LF
depending on checked or not.
Did I miss a case ?
General: Background coloring (green(found), blue(missing), red(RegExpr error).
Hello @sky1ab ,
Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_5.23.109.1_rc2.paf" or newer, see in issue #1129.
"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.
Also, feel free to test the "BETA/RC Setup", version "Notepad3_5.23.109.1_rc2_Setup" or newer, see the 2nd list in issue #1129.
Comments and suggestions are welcome... 😃