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.



  • @Sarah-Northway

    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. :/


Log in to reply