Hi Jim and list, 2016-11-26(Sat) 5:40:52 UTC+9 vim-dev ML: > > I can reproduce it. > > > And I wrote a patch for this issue. (Attached) > > > Could you please check this patch? > > > When issue has been resolved, I'll add a test later. > > > > This patch fixes it for me, with 8.0.52. I'm not familiar with the Vim > source, but if there's anything I can do to help, please let me know. > > > > Thanks you!
Ah, this patch is bad solution. I rewrote a patch that respect the following description of the document. :help :mksession doc> 8. Restores all windows with the same layout. If 'sessionoptions' contains doc> "help", help windows are restored. If 'sessionoptions' contains "blank", doc> windows editing a buffer without a name will be restored. That is, when 'sessionoptions' contains 'blank', then also restores the empty window. -- Best regards, Hirohito Higashi (a.k.a. h_east) -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 439467c..a22de59 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -10992,12 +10992,16 @@ makeopens( * If there is an empty, unnamed buffer we will wipe it out later. * Remember the buffer number. */ - if (put_line(fd, "if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''") == FAIL) - return FAIL; - if (put_line(fd, " let s:wipebuf = bufnr('%')") == FAIL) - return FAIL; - if (put_line(fd, "endif") == FAIL) - return FAIL; + if (!(ssop_flags & SSOP_BLANK)) + { + if (put_line(fd, "if expand('%') == '' && !&modified && line('$') <= 1 " + "&& getline(1) == ''") == FAIL) + return FAIL; + if (put_line(fd, " let s:wipebuf = bufnr('%')") == FAIL) + return FAIL; + if (put_line(fd, "endif") == FAIL) + return FAIL; + } /* * Now save the current files, current buffer first. @@ -11217,14 +11221,17 @@ makeopens( /* * Wipe out an empty unnamed buffer we started in. */ - if (put_line(fd, "if exists('s:wipebuf')") == FAIL) - return FAIL; - if (put_line(fd, " silent exe 'bwipe ' . s:wipebuf") == FAIL) - return FAIL; - if (put_line(fd, "endif") == FAIL) - return FAIL; - if (put_line(fd, "unlet! s:wipebuf") == FAIL) - return FAIL; + if (!(ssop_flags & SSOP_BLANK)) + { + if (put_line(fd, "if exists('s:wipebuf')") == FAIL) + return FAIL; + if (put_line(fd, " silent exe 'bwipe ' . s:wipebuf") == FAIL) + return FAIL; + if (put_line(fd, "endif") == FAIL) + return FAIL; + if (put_line(fd, "unlet! s:wipebuf") == FAIL) + return FAIL; + } /* Re-apply 'winheight', 'winwidth' and 'shortmess'. */ if (fprintf(fd, "set winheight=%ld winwidth=%ld shortmess=%s",