Loading ...
Sorry, an error occurred while loading the content.

Directory Change Bug in Windows Gvim/Vim

Expand Messages
  • Bill McCarthy
    Hello Vim Developers, Opening a file with full path name changes the directory. For example: gvim -u NONE -N vim vimfiles myfile.vim keeps my current
    Message 1 of 3 , Aug 2, 2008
    • 0 Attachment
      Hello Vim Developers,

      Opening a file with full path name changes the directory.
      For example:

      gvim -u NONE -N \vim\vimfiles\myfile.vim

      keeps my current directory. However,

      gvim -u NONE -N c:\vim\vimfiles\myfile.vim

      changes the directory, in vim, to c:\vim\vimfiles.

      --
      Best regards,
      Bill


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Bram Moolenaar
      ... That is normal. Reason is that when Vim sees the full path it assumes it is invoked by the Explorer, possibly from the desktop. There is no other way to
      Message 2 of 3 , Aug 3, 2008
      • 0 Attachment
        Bill McCarthy wrote:

        > Hello Vim Developers,
        >
        > Opening a file with full path name changes the directory.
        > For example:
        >
        > gvim -u NONE -N \vim\vimfiles\myfile.vim
        >
        > keeps my current directory. However,
        >
        > gvim -u NONE -N c:\vim\vimfiles\myfile.vim
        >
        > changes the directory, in vim, to c:\vim\vimfiles.

        That is normal.

        Reason is that when Vim sees the full path it assumes it is invoked by
        the Explorer, possibly from the desktop. There is no other way to
        detect that.

        --
        ARTHUR: Ni!
        BEDEVERE: Nu!
        ARTHUR: No. Ni! More like this. "Ni"!
        BEDEVERE: Ni, ni, ni!
        "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Bill McCarthy
        ... If you mean Windows Explorer, won t that set the current directory to C: Documents and Settings Bill Desktop ? What wrong with that? I would much rather
        Message 3 of 3 , Aug 3, 2008
        • 0 Attachment
          On Sun 3-Aug-08 3:17pm -0600, Bram Moolenaar wrote:
          > Bill McCarthy wrote:

          >> Opening a file with full path name changes the directory.
          >> For example:
          >>
          >> gvim -u NONE -N \vim\vimfiles\myfile.vim
          >>
          >> keeps my current directory. However,
          >>
          >> gvim -u NONE -N c:\vim\vimfiles\myfile.vim
          >>
          >> changes the directory, in vim, to c:\vim\vimfiles.

          > That is normal.
          >
          > Reason is that when Vim sees the full path it assumes it is invoked by
          > the Explorer, possibly from the desktop. There is no other way to
          > detect that.

          If you mean Windows Explorer, won't that set the current
          directory to "C:\Documents and Settings\Bill\Desktop"?

          What wrong with that? I would much rather that behavior
          than have Vim change directories on its own.

          --
          Best regards,
          Bill


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        Your message has been successfully submitted and would be delivered to recipients shortly.