Hi everybody,

I believe I have found a bug in Vim 7.0.146, relating to mksession and
lcd. Here is a small example. 
1) Open Vim
2) :e file1.txt
3) :tabe temp/file2.txt "Any different directory
4) :lcd %:h
5) :mks test.vim
6) Close vim
7) Open vim
8) :source test.vim
9) The second tab is empty. The reason is that in the file test.vim the
order of events are (ignoring the uninteresting stuff):
 - cd where-ever-file1-is
 - edit file1.txt
 - tabnew
 - edit file2.txt
 - lcd where-ever-file2-is/

So even the second tab contains the correct lcd, the files opened in the
wrong directory. 

To manually fix the problem in the test.vim file:
/^lcd/
dd
/^edit file2/
P
:wq

Alternatively, the full path should be used to open file2.txt

Regards
Marius

Reply via email to