Bug (?) Highlight text in a file then select Run -> Open file in another instance causes loop
-
If you highlight text in a file then select Run -> Open file in another instance, the other instance opens and goes into a loop where NotePad++ will attempt to create a file with a name of each word in the highlighted text.
E.g. File contains the words
Hello World
NotePad++ will open the other instance, and try to create a file called Hello, then fail, and another called World and also fail.
Is this a known issue?
I did this by mistake with a SQL file and a lot of it highlighted, and got about 50 dialogue windows asking to create files ‘CASE’ ‘WHEN’ etc…
Not highlighting any text and just selecting ‘Run -> Open file in another instance’ doesnt work either. The New instance just has a blank ‘New 1’ file open instead.
-
So here’s how it works. It takes your selection and assumes that you want to open that as a file (or files). If your selection contains spaces and doesn’t have double quotes, then each space-separated “token” will be considered a different file. If each token doesn’t contain path information, Notepad++ will attempt to open that “file” in the current folder (which in the portable install I use, is the folder that Notepad++.exe lives in). If the “intended” file isn’t found, Notepad++ will prompt to create it.
I think this as described is what you are seeing. I don’t think of it as a “bug”, but maybe just something that is less than ideal. :-)
If you are going to use this feature, I’d suggest being careful about what text is selected when you activate it.Contrast this behavior with the right-click (in a document tab window) entry Open File. There, if you have a similar selection when invoking the feature, you get a popup box that says The file you’re trying to open doesn’t exist. Perhaps it would be better if the Run menu’s version worked similarly…
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login