mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 08:48:16 +00:00
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 vim/vim#9945) Add a test.
7d42840033
This commit is contained in:
@@ -365,7 +365,7 @@ static int put_view(FILE *fd, win_T *wp, int add_edit, unsigned *flagp, int curr
|
||||
// edit that buffer, to not lose folding information (:edit resets
|
||||
// folds in other buffers)
|
||||
if (fprintf(fd,
|
||||
"if bufexists(\"%s\") | buffer %s | else | edit %s | endif\n"
|
||||
"if bufexists(fnamemodify(\"%s\", \":p\")) | buffer %s | else | edit %s | endif\n"
|
||||
// Fixup :terminal buffer name. #7836
|
||||
"if &buftype ==# 'terminal'\n"
|
||||
" silent file %s\n"
|
||||
|
Reference in New Issue
Block a user