0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0803: session file has problem with single quote in file name

Problem:    Session file has problem with single quote in file name. (Jon
            Crowe)
Solution:   Use a double quoted string.  Add a test.
This commit is contained in:
Bram Moolenaar
2019-01-24 13:34:42 +01:00
parent a5be9b6248
commit ad36a3588d
3 changed files with 18 additions and 2 deletions

View File

@@ -11838,9 +11838,9 @@ put_view(
* edit that buffer, to not lose folding information (:edit resets
* folds in other buffers)
*/
if (fputs("if bufexists('", fd) < 0
if (fputs("if bufexists(\"", fd) < 0
|| ses_fname(fd, wp->w_buffer, flagp, FALSE) == FAIL
|| fputs("') | buffer ", fd) < 0
|| fputs("\") | 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