*/
if (other_file)
{
+ int prev_alt_fnum = curwin->w_alt_fnum;
+
if (!(flags & (ECMD_ADDBUF | ECMD_ALTBUF)))
{
if ((cmdmod.cmod_flags & CMOD_KEEPALT) == 0)
}
if (buf == NULL)
goto theend;
+ if (curwin->w_alt_fnum == buf->b_fnum && prev_alt_fnum != 0)
+ // reusing the buffer, keep the old alternate file
+ curwin->w_alt_fnum = prev_alt_fnum;
+
if (buf->b_ml.ml_mfp == NULL) // no memfile yet
{
oldbuf = FALSE;
" Test for expanding special keywords in cmdline
func Test_cmdline_expand_special()
%bwipe!
- call assert_fails('e #', 'E499:')
+ call assert_fails('e #', 'E194:')
call assert_fails('e <afile>', 'E495:')
call assert_fails('e <abuf>', 'E496:')
call assert_fails('e <amatch>', 'E497:')
" add 10 lines, delete 6 lines, undo 3
set undofile
- call setbufline(0, 1, ['one', 'two', 'three', 'four', 'five', 'six',
+ call setbufline('%', 1, ['one', 'two', 'three', 'four', 'five', 'six',
\ 'seven', 'eight', 'nine', 'ten'])
set undolevels=100
normal 3Gdd
def Test_getbufline()
e SomeFile
var buf = bufnr()
- e #
+ sp Otherfile
var lines = ['aaa', 'bbb', 'ccc']
setbufline(buf, 1, lines)
getbufline('#', 1, '$')->assert_equal(lines)
CheckScriptFailure([
'vim9script',
'gui -f#comment'
- ], 'E499:')
+ ], 'E194:')
enddef
def Test_vim9_comment_not_compiled()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3363,
/**/
3362,
/**/