forked from aniani/vim
patch 8.2.4566: check for existing buffer in session file may not work
Problem: Check for existing buffer in session file does not work for files in the home directory. Solution: Use fnamemodify(). (James Cherti, closes #9945) Add a test.
This commit is contained in:
committed by
Bram Moolenaar
parent
6e2e2cc95b
commit
7d42840033
@@ -385,9 +385,9 @@ put_view(
|
||||
// Note, if a buffer for that file already exists, use :badd to
|
||||
// edit that buffer, to not lose folding information (:edit resets
|
||||
// folds in other buffers)
|
||||
if (fputs("if bufexists(\"", fd) < 0
|
||||
if (fputs("if bufexists(fnamemodify(\"", fd) < 0
|
||||
|| ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
|
||||
|| fputs("\") | buffer ", fd) < 0
|
||||
|| fputs("\", \":p\")) | buffer ", fd) < 0
|
||||
|| ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
|
||||
|| fputs(" | else | edit ", fd) < 0
|
||||
|| ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
|
||||
|
Reference in New Issue
Block a user