Bram Moolenaar wrote:

> What is the session file that opens subfodler/test.txt?  Best is if you
> can give the commands to create it, thus a whole reproducible example.

The example is the same like in my original posting, however with
this .vimrc (I copied it long ago from vim.org):

--- (BEGIN .vimrc) ---
function AlwaysCD()
        if bufname("") !~ "^ftp://";
                lcd %:p:h
        endif
endfunction
autocmd BufEnter * call AlwaysCD()
--- (END) ---

To reproduce (full description):

* cd ~
* create a .vimrc like above
* mkdir subfolder

* rm .viminfo
* mv .vim .vim.bak
* vim --noplugin subfolder/test.txt
* :w
* :mks! ~/sess-test.vim
* :qa
* vim --noplugin -S sess-test.vim

Resulting error message:

--- (START) ---
"subfolder/test.txt" [New DIRECTORY]
Error detected while processing function AlwaysCD:
line    2:
E344: Can't find directory "subfolder" in cdpath
E472: Command failed
Press ENTER or type command to continue
--- (END) ---

A sidenote: The created session file contains the line "badd +0
subfolder/test.txt",
however, I believe in earlier versions of vim it always was like "badd
+0 ~/subfolder/test.txt".
I neither know if I rememer right nor if that is related to the above
issue.

Thank you!
 Felix
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to