Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
BillDenton opened this issue Oct 24, 2016 · 12 comments
Closed
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality workbench-editors Managing of editor widgets in workbench window

Comments

@BillDenton
Copy link

  • 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.

@bpasero bpasero changed the title Files modified externally on disk are automatically reloaded without warning Show warning when Files modified externally on disk Oct 24, 2016
@bpasero bpasero added feature-request Request for new features or functionality file-explorer Explorer widget issues labels Oct 24, 2016
@bpasero bpasero removed their assignment Oct 24, 2016
@bpasero bpasero changed the title Show warning when Files modified externally on disk Show a warning when Files modified externally on disk Oct 24, 2016
@cori
Copy link

cori commented Dec 23, 2016

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.

@BillDenton
Copy link
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".

@v3ss0n
Copy link

v3ss0n commented Feb 3, 2017

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

@Raydir
Copy link

Raydir commented Oct 5, 2017

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.

@siran
Copy link

siran commented May 28, 2018

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.

@euginio
Copy link

euginio commented May 30, 2018

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

@bpasero
Copy link
Member

bpasero commented Sep 20, 2018

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.

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

@bpasero bpasero closed this as completed Sep 20, 2018
@bpasero bpasero added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 20, 2018
@siran
Copy link

siran commented Sep 21, 2018

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

@bpasero
Copy link
Member

bpasero commented Sep 21, 2018

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

@siran
Copy link

siran commented Sep 21, 2018

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

@bpasero
Copy link
Member

bpasero commented Sep 21, 2018

@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".

@siran
Copy link

siran commented Sep 22, 2018

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.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality workbench-editors Managing of editor widgets in workbench window
Projects
None yet
Development

No branches or pull requests

8 participants