patch 8.2.3363: when :edit reuses the current buffer the alternate file is set
Problem: When :edit reuses the current buffer the alternate file is set to
the same buffer.
Solution: Only set the alternate file when not reusing the buffer.
(closes #8783)
diff --git a/src/testdir/test_undo.vim b/src/testdir/test_undo.vim
index 2621412..bfcc538 100644
--- a/src/testdir/test_undo.vim
+++ b/src/testdir/test_undo.vim
@@ -582,7 +582,7 @@
" 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