Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not trim whitespaces in search and replace history #1432

Closed
alexantr opened this issue Jul 17, 2019 · 4 comments
Closed

Do not trim whitespaces in search and replace history #1432

alexantr opened this issue Jul 17, 2019 · 4 comments
Labels

Comments

@alexantr
Copy link
Contributor

Search patterns are placing in history without leading and trailing spaces. Patterns with whitespaces only aren't saving at all.
This is unuseful feature if we want to find same letters like " - " or 2 or more whitespaces in several files. Or replace some letters with pattern whith whitespaces around. Everytime we need to input search pattern manually instead of use already saved from history.

How to reproduce:

  1. Activate Settings -> Rememder -> Remeber Search Pattern
  2. Try to find string like this one:
    np3 1
  3. Close notepad and open file and press F3. You see only hyphen selected:
    np3 2
  4. Open Find dialog and you'll find hyphen without whitespaces:
    np3 3

Same for saved replace patterns. There is saved "=" instead " = ":
np3 4

PS. Notepad from windows remember patterns with whitespaces:
windows notepad

@RaiKoHoff
Copy link
Collaborator

Feel free to test development beta version _5.19.718.2396_BETA.
Remarks: The new SimpleIni .ini-file engine trims all white-spaces around strings. Solution: add extra ASCII chars at begin (BTX (0x02) - begin of text) and end (ETX (0x03) - end of text) around the strings for all strings in MRUs (Most Recently Used lists), disadvantage: you can not search for these control chars, but there are better RegEx alternatives for it ... ;-)

@alexantr
Copy link
Contributor Author

Works great, thanks!

@hpwamr
Copy link
Collaborator

hpwamr commented Jul 23, 2019

Hello @alexantr ,
In Notepad3Portable_5.19.723.2403_BETA, we have replace the "STX" and "ETX" code by DoubleQuotes (").

If you are using .ini-files from prevoius 5 BETA versions:
----------------------------------------------------------
please clear all MRUs (Most Recently Used) lists in the .ini-file
or replace � and � by DoubleQuotes (").

Feel free to test the BETA version "Notepad3Portable_5.19.723.2403_BETA" or higher.
See "Notepad3 BETA-channel access #1129" or download it from Notepad3Portable_5.19.723.2403_BETA.

@alexantr
Copy link
Contributor Author

@hpwamr thank for information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants