Hi Björn The behaviour change is more subtle than I thought.
You're right - if I follow your steps exactly, i.e. cd into a directory and then type "mvim file1" to open the MacVim window to edit file1, then the working directory stays the same regardless of what files I drag in from the finder window. But, what I usually do is cd into my project directory and just type "mvim" to open a blank window with the working directory set to the project root. In that case, when I first do :pwd, the working directory is the project root. Then, as soon as I drag in a file from a different directory, the working directory changes. In fact, the working directory seems to lock to the directory containing whichever file is dragged in first. Subsequent file drag and drops do not change :pwd That's the difference from 7.2 - with MacVim 7.2, the working directory stays at the project root, regardless of what files I drag in, even if there was no file being edited in the first window. Now that I know what's happening, I can work around it by always being careful to type "mvim somefile" to open MacVim, or just make sure I drag in a file from the project root before I do anything else. Many thanks for taking the time to look into this. David On 2 September 2010 11:50, björn <[email protected]> wrote: > On 2 September 2010 10:48, David Salgado wrote: >> Hi Dave >> >>> Have you tried disabling your .(g)vimrc and .vim directory to see if the >>> behavior persists? >> >> Good thought, and yes it does. Moving all .vim* stuff out of my home >> directory and starting macvim again, I get the same behaviour - the >> working directory changes whenever I drag a file into the MacVim >> window. > > Try going through all the steps at > > http://code.google.com/p/macvim/wiki/ReportingBugs > > I cannot reproduce this behavior. If I open Terminal, mvim file1, > open another directory in Finder and drag the file onto the MacVim > window, then :pwd yields the folder of "file1". Please follow the > steps above to the letter -- there really should be no reason why the > working dir should change on a drag and drop. My initial thought was > that it sounds like you have an autocommand or something that causes > this. > > Björn > > -- > You received this message from the "vim_mac" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > -- You received this message from the "vim_mac" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
