edenzik / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

Changed file loading issues #229

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Works fine:

Open a file with MacVim. Go to another window, like say Firefox. Change the
open file in the background using another process (tidy in my case).

Switch back to MacVim and it happily asks if you want to load the file.

Unexpected results:
Open two files with MacVim. Keep the text file which you are not going to
change in the foreground. Change the other file (running tidy).

Switch back to the edited textfile and MacVim says that the file no longer
exists. It should bring up the same "file changed in background, load new
file" popup that the first case brings up.

MacVim 7.2, Mac OSX 10.6.1. The filesystem with my files is mounted by NFS.

Original issue reported on code.google.com by rod.tay...@gmail.com on 26 Oct 2009 at 3:31

GoogleCodeExporter commented 9 years ago
Does the same thing happen if you use the built-in version of Vim?  (Start it 
by entering "vim" in Terminal.)

Original comment by bjorn.winckler@gmail.com on 26 Oct 2009 at 3:47

GoogleCodeExporter commented 9 years ago
No.

If I load 2 files and use :n to get to the last file in the list; then "echo 
'FOO' >
first_file.txt"; then :N to get to the first file vim will show the new 
contents of
the file without any prompting.

Of course, in MacVim I have the files open in two different windows and switch 
using
the mouse rather than :n and :N.

Original comment by rod.tay...@gmail.com on 26 Oct 2009 at 4:01

GoogleCodeExporter commented 9 years ago
I can't reproduce this bug.  Can you please post a test file and exact steps on 
how you invoke tidy? 

Original comment by bjorn.winckler@gmail.com on 26 Oct 2009 at 7:18

GoogleCodeExporter commented 9 years ago
Ahh. I see. Indeed it is very specific to my situation. The inode has to change 
for
it to fail and filesystem must be mounted by NFS. A local mount does not have 
this issue.

1) Mount filesystem by NFS
2) echo "line1 - file1" > file1.txt
3) echo "line1 - file2" > file2.txt
4) echo "line1 - file3" > file3.txt
5) Open file1.txt and file2.txt in MacVim (double click text files in Finder)
6) Have MacVim focus on file2.txt
7) mv file3.txt file1.txt
8) Switch MacVim focus to file1.txt.

If in step 6 you have the last focus on the web browser, it seems to do as you 
expect
and notify the file has changed and ask if you wish to load it. This is the 
part I
really don't understand; perhaps it just changes the timing?

Attached is a screen capture with the results. NFS or network mount is 
definitely
required. Running the same steps on the Desktop (local drive) gives the 
expected outcome.

Original comment by rod.tay...@gmail.com on 26 Oct 2009 at 7:51

Attachments:

GoogleCodeExporter commented 9 years ago
Please bring this issue up on the vim_dev Google group.  This seems like a 
problem with core Vim and not 
MacVim.  Thanks.

Original comment by bjorn.winckler@gmail.com on 26 Oct 2009 at 8:29

GoogleCodeExporter commented 9 years ago
I'm closing this issue, please take any further discussion to vim_dev.

Original comment by bjorn.winckler@gmail.com on 31 Dec 2010 at 1:57