Community
    • 登入

    How can I prevent showing the "reload the document?" message, when I close npp!?

    已排程 已置頂 已鎖定 已移動 Help wanted · · · – – – · · ·
    4 貼文 3 Posters 6.8k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Behzad EbrahimiB
      Behzad Ebrahimi
      最後由 編輯

      How can I prevent showing the “reload the document?” message box, when I close npp!?
      That message will show when the loaded document was changed externally.

      PeterJonesP Alan KilbornA 2 條回覆 最後回覆 回覆 引用 0
      • PeterJonesP
        PeterJones @Behzad Ebrahimi
        最後由 編輯

        @Behzad-Ebrahimi ,

        Honestly, I was surprised it only happens when you try to close NPP. I would have expected it to trigger that within a minute or so of the external change… unless maybe you’d been in another window. Quick experiment: yeah, if you’re in another program’s window when the file changes externally, the NPP warning dialog doesn’t show up until you re-activate the NPP window. If your first action happens to be “close npp” (for example, clicking on the window’s X), then it will appear that closing the window is what triggered it, when really it was activating the window before the close that triggered it.

        To avoid the warning altogether, you could turn on Monitoring (View > Monitoring (tail -f) , or the eyeball icon on the toolbar), which means that it will see the change automatically.

        Alternately, the Settings > Preferences > MISC > File Status Auto-Detection 🛈 pulldown options allow you to Disable status auto-detection, which means Notepad++ won’t look for external changes.

        !!! Please note: disabling auto-detection will mean that if your external process changes your file, then you go back into Notepad++ and edit then save, it will keep the changes from Notepad++ and lose your changes from the external process – this may or may not be what you intend !!!

        1 條回覆 最後回覆 回覆 引用 0
        • Alan KilbornA
          Alan Kilborn @Behzad Ebrahimi
          最後由 編輯

          @Behzad-Ebrahimi said in How can I prevent showing the "reload the document?" message, when I close npp!?:

          How can I prevent showing the “reload the document?” message box, when I close npp!?
          That message will show when the loaded document was changed externally.

          Strangely, I cannot replicate the OP’s experience (as far as we can tell what that is) with N++ 7.9.1.

          I create and save to disk two new files.
          I then switch away for Notepad++ and make changes to those 2 files with another app (and save them there too of course).
          Then I move the mouse back to the N++ window so that my first action there will be to click the X in the upper right corner.
          Doing that immediately closes N++ with no reloading prompts, for me.

          This is with the Setting @PeterJones mentions set to either Enable or Enable for all opened files.

          PeterJonesP 1 條回覆 最後回覆 回覆 引用 0
          • PeterJonesP
            PeterJones @Alan Kilborn
            最後由 編輯

            @Alan-Kilborn said in How can I prevent showing the "reload the document?" message, when I close npp!?:

            Doing that immediately closes N++ with no reloading prompts, for me.

            Weird.

            Enabled

            Disabled

            1 條回覆 最後回覆 回覆 引用 0
            • 第一個貼文
              最後的貼文
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors