Clear "Replace with" field in the find in files and replace tabs in find box
-
I have a bit of a scary issue that already almost messed my files up had it not of been a small set. When I start up Notepad++ I always see this field auto filled and with me having a touchscreen I accidentally hit the replace in files button. This has been an issue with me since I started using Notepad++ back in 2014. Is there a setting to auto clear or is this a bug? Everytime I start Notepad++ the last replace with term is in there. Help!
-
There is no such thing as an accidental Replace-in-FIles. Why? Well, because there is always a confirmation step (Are you sure?) to that action. If you blow through that confirmation without thinking about it seriously, then I guess you deserve whatever happens. Of course, maybe you are talking about Replace in open files, but that’s not what you said…and the “open files” version is undoable so it isn’t catastrophic.
There is no auto-clear of the Replace-with zone, nor is this a bug. It is just how it works.
-
I pretty much agree with @scott-sumner 's comments on this. It may not be a great design, though. I would much rather have the Replace box contents follow the Find box contents, when the Replace dialog is invoked. Most times I need to replace with something very similar to what is already there–for example, in coding, maybe I am making a variable name slightly more descriptive–I want to keep the bulk of what is there already but make a slight change. Having the original already in the Replace box for tweaking would be ideal. Also, this would solve your problem, I think. If the Find box is the same as the Replace box, “accidentally” doing a replace would change nothing.
Perhaps you meant to press the Close button, which is right next to the Replace All in Open Docs button…hmmm…I can see this happening. You could switch to using the <ESC> keypress to close the dialog box. Or, of course, press the X button in the title bar of the window, although that is small. Because there are these 2 other options for dismissing the dialog, maybe the best option would be for the Close button to be eliminated entirely. That way, no accidental press of the adjacent button, and the dialog box would be less cluttered.