Skip to content

Show a prompt when files modified externally on disk (apply, ignore, diff) #14298

Closed

Description

@BillDenton
  • VSCode Version: 1.6.1
  • OS Version: Windows 7 Professional.

Steps to Reproduce:

  1. Load a file into VSCode.
  2. Edit the same file in another editor.
  3. Look at VSCode and see that file has been updated.

Files modified externally on disk are automatically reloaded without warning. This means that I'm not aware that they have changed. It would good to have an indication that this happened with an choice to compare & merge the new and old files, keep the old version or load the new version. I would guess that this would have to be configurable by file or file type (with a global default). For example, SlickEdit shows a prompt to allow reload, cancel (i.e. keep the file in the editor), close or diff.

Activity

  1. changed the title [-]Files modified externally on disk are automatically reloaded without warning[/-] [+]Show warning when Files modified externally on disk[/+] on Oct 24, 2016
  2. added
    feature-request
    file-explorer
    on Oct 24, 2016
  3. changed the title [-]Show warning when Files modified externally on disk[/-] [+]Show a warning when Files modified externally on disk[/+] on Oct 24, 2016
  4. cori commented on Dec 23, 2016

    @cori

    As a clarification, simply showing a warning (and then overwriting the file?) doesn't really capture the spirit of the problem here, so the resolution needs to do more then just show a warning - it also needs to keep control over what subsequently occurs in the hands of the user, not the application, by virtue of a prompt or something.

  5. BillDenton commented on Jan 4, 2017

    @BillDenton
    Author

    My original comment explains that there a user choice is required so the user can chose "reload, cancel (i.e. keep the file in the editor), close or diff". Also my original title was "Files modified externally on disk are automatically reloaded without warning".

  6. v3ss0n commented on Feb 3, 2017

    @v3ss0n

    Related problem #19826
    The Undo History is also gone if file is changed on disk by another app or extensions.

  7. changed the title [-]Show a warning when Files modified externally on disk[/-] [+]Show a prompt when files modified externally on disk (apply, ignore, diff)[/+] on Aug 11, 2017
  8. Raydir commented on Oct 5, 2017

    @Raydir

    I'd call this issue very important!

    Problem:

    1. working on a file in VSC for several hours.
    2. leave your workplace for lets say going to the toilet for 5mins
    3. in the meantime someone is replacing the file (overwrite)
    4. come back and go further with your work

    --> you wont even notice, that the file has been reloaded if your not really looking at it.

  9. added
    file-watcher
    and removed
    file-explorer
    on Nov 17, 2017
  10. added
    workbench-editors
    and removed
    file-watcher
    on Nov 17, 2017
  11. siran commented on May 28, 2018

    @siran

    This issue has more than 1.5years open. Is the team not interested/willing to fix this? I simply can't start using VSCode as my main editor until this is addressed.

  12. euginio commented on May 30, 2018

    @euginio

    Problem persist in last VSCode Version in WS10 Pro. We all lost work every week

  13. bpasero commented on Sep 20, 2018

    @bpasero
    Contributor

    I am merging this #23107 which talks about having a setting to control if a change outside of VSCode should bring up a confirmation or not.

    Eugenio Arosteguy (@euginio) can you please explain how this behaviour means you lost work?

    Others: would like to understand why it is so important to be notified when a file changed externally? What is the benefit of getting a confirmation dialog popup (probably even modal?) each time a file has changed?

  14. added
    *duplicate
    on Sep 20, 2018
  15. siran commented on Sep 21, 2018

    @siran

    Is this closed as in "won't do"?

  16. bpasero commented on Sep 21, 2018

    @bpasero
    Contributor

    An Rodriguez (@siran) how is my comment in #14298 (comment) indicating that?

  17. siran commented on Sep 21, 2018

    @siran

    Benjamin Pasero (@bpasero): I saw the ticket "closed" and I misuderstood. My comment was an honest question, no subtext.
    image

    Answering your question: In my experience: being notified if a file changes gives me a greater sense of control/security over the files I have open, when switching branches, for example. Or when a file has been modified by another process or editor. Maybe I'm just watching a log file, and I don't want to change what Im seeing without accepting it, I find deeply disturbing that a file I have open in my editor can change silently without notice.
    VS Code would be more powerful with an option to choose being notified or not when a file changes.

  18. bpasero commented on Sep 21, 2018

    @bpasero
    Contributor

    An Rodriguez (@siran) closed as duplicate of #23107. So this does neither mean it will not happen nor it did happen.

    Ok I understand that reasoning, but I am still waiting for someone to explain how this can cause "work to get lost".

  19. siran commented on Sep 22, 2018

    @siran

    As far as I know, modified files are not updated/changed silently by VS Code, so there is no 'active loss of work' since you had not modified the file. However it could certainly make you waste time, or make to resort to stupid tricks like modifying a file with a space not to have it changed silently, unadvertently and unwillingly by VSCode.

  20. locked and limited conversation to collaborators on Nov 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    *duplicatefeature-requestworkbench-editors

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions