Community
    • Login

    Bug: Find in Files opens new copy

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 1.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sarah NorthwayS Offline
      Sarah Northway
      last edited by

      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.

      Scott SumnerS 1 Reply Last reply Reply Quote 2
      • Scott SumnerS Offline
        Scott Sumner @Sarah Northway
        last edited by

        @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?

        1 Reply Last reply Reply Quote 0
        • Scott SumnerS Offline
          Scott Sumner
          last edited by

          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!

          1 Reply Last reply Reply Quote 1
          • Sarah NorthwayS Offline
            Sarah Northway
            last edited by

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

            1 Reply Last reply Reply Quote 1

            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
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors