Bug: Find in Files opens new copy
-
I’ve regularly got ~20 files open, and sometimes I clone one to a second view on the right side. If I modify that file on the left, the copy to the right is immediately changed as well, even before hitting save. This is a very useful feature!
The problem happens if I use Find in File, and in the results show a file which is already open. If I double-click the results line it will open a new copy of the file. But this one is disconnected from the other(s) already open. If I type in one, the changes are NOT reflected in the other.
So I can work on one copy of the file, then accidentally switch to the second and work on that one. When I save, it quietly overwrites the other in the filesystem. N++ doesn’t notice until I switch out to another program and back, then it pops up “This file has been modified by another program” (The other program was N++) and prompts me to reload. Worst case I lose work, best case I have to merge the two copies.
It would be best if Find in Files jumped to an already-open copy of a file rather than open a new instance. It would also help if all copies of a file were kept in sync no matter how they were opened.
-
I am unable to replicate what you are seeing, at least with Notepad++ 64-bit version 7.5.6. It works as I expect (which is definitely different than your experience). Can you provide the
?menu ->Debug Info...from the version you are encountering this with? -
I do notice, however, that if I exit Notepad++ with a cloned file modified but unsaved, the next time I run, the originally cloned files still appear to be cloned (otherwise a single file should not be loaded into TWO N++ editor tabs) and still show the unsaved changes, but they are no longer linked, i.e., changes in one do NOT affect the other!
-
Confirm I see the issue you’re describing in 7.5.7 (unsaved changes cause clones to de-link). This is definitely part of my problem.
But I just realized my issue with find-in-files opening a new de-linked copy is due to windows junctions. I’d somehow opened the files with the actual location then was searching via the junction folder. Notepad++ probably has no way of knowing it’s a symbolic link to the same file. Symlinks are trouble. :/
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