Invoke find/replace with selection - selection box not marked
-
@appyface said in Invoke find/replace with selection - selection box not marked:
I could swear NPP also does this, but of late it isn’t happening at all.
Sorry, not actually able to provide a solution, but there was this discussion a short time ago (and links to earlier discussions). Read:
https://community.notepad-plus-plus.org/topic/20586/in-selection-grayed-out-in-the-find-replace-box?_=1612813460756I’ve been unable to produce the fault on demand, which is what I think is needed to get the attention of the developers.
Terry
-
@Terry-R Thanks for that link. I think that is different issue, if I reading it right?
I too have seen the ‘in selection’ box greyed out/can’t mark it of late. And I also haven’t been able to pin down the stituation when that happens. But that does happen a lot for me.
What I’m asking about is something else. I thought NPP had behaved in past like my other text editor does: Highlight some text in the document, then press CTRL-F. The ‘in selection’ box is marked automatically because text in the document was highlighted first before invoking CTRL-F. And if no text is selected in the document (cursor is between letters so to speak) and press CTRL-F, then the ‘in selection’ box is clear.
Again, maybe I’m just daft and thought NPP used to behave this way. It definitely doesn’t now and I can’t find any option to switch it on.
-
Here’s how it works: If you have over a certain amount of text selected (I believe it is a thousand or maybe 1024) characters, THEN In selection will automatically be ticked when you invoke a Find / Replace.
-
@Alan-Kilborn Thanks for info. I will check this and get back.
-
Here’s what’s happening for me - 64-bit portable 7.9.3 version.
-
Invoke CTRL-F with 1025 characters selected and the ‘in selection’ box is automatically marked. (Characters include line delimiters, special characters, etc.) Less than that and ‘in selection’ is not automatically marked.
-
Once ‘in selection’ is marked, it remains marked for all character selections with CTRL-F regardless of selection length - until CTRL-F is invovked with no characters selected, then ‘in selection’ is automatically cleared. A 1025 character selection is required before ‘in selection’ will be marked automatically again.
If ‘in selection’ is manually marked, it behaves as in #2 above. If ‘in selection’ is manually unmarked, it behaves as in #1.
@Alan-Kilborn Thanks for putting me onto the right direction to find out what is happening.
I’d love to have a simple preference setting that if any text is highlighted, mark the box, if none, unmark the box. But now that I know how it works today, it’s certainly not a deal breaker. Thanks for help and info.
-
-
@appyface I am using NPP 8.3.3 and the “in selection” behavior is still erratic and problematic. For instance it doesn’t work at all if you’re using a rectangular selection. Not even if the rectangular selection extends for more than 1025 rows. It’s a bad bug because competing editors like TextPlus don’t have this problem and because for work I need to edit large amounts of formatted data and I don’t want to mess with regular expressions for my replacements.
-
@sandro-tanganelli ,
Then use TextPlus so you don’t have to mess with the regular expressions. Wow…what a concept, using the tool you need. Besides, you just answered a year old post just to be snide about something that you claim you don’t want to use anyway. Cya. -
@sandro-tanganelli said in Invoke find/replace with selection - selection box not marked:
it doesn’t work at all if you’re using a rectangular selection.
It never has. I think I remember something about someone wanting to contribute a change to the software to make it do so, but the Notepad++ author was of the opinion that “too much code would have to change” to make it worth it (I suppose meaning it was too risky for breaking existing behavior).
-
@lycan-thrope necro-posting may stink but the issue has not been further discussed and no solution was implemented.
Also, I’d rather not install one more text editor when NPP can easily fix its bug.
As much as I hate all the little incongruences of NPP it’s a better tool than TextPad or UltraEdit for what I need to do.
-
@alan-kilborn said in Invoke find/replace with selection - selection box not marked:
It never has. I think I remember something about someone wanting to contribute a change to the software to make it do so, but the Notepad++ author was of the opinion that “too much code would have to change” to make it worth it (I suppose meaning it was too risky for breaking existing behavior).
As long as you know your rectangular selection may not be rectangular after the edit…
After all, I don’t know other user’s experiences but when you work with regular expressions it seems a costant that you don’t get what you want the first five or six trials.
Nothing really new, except you’d not get what you want… quicker. :-)
-
FWIW, and I don’t know why I didn’t mention this earlier, I wrote a PythonScript to handle this, and it is HERE.