-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #216 from lambdalisue/fix-bd
Fix behavior on 'bdelete' command
- Loading branch information
Showing
2 changed files
with
75 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Describe drawer-auto-quit | ||
After all | ||
%bwipeout! | ||
let g:fern#disable_drawer_auto_quit = 0 | ||
End | ||
|
||
Before | ||
%bwipeout! | ||
let g:fern#disable_drawer_auto_quit = 0 | ||
End | ||
|
||
Describe keep | ||
It automatically create a new buffer to keep the number of windows on 'quit' | ||
Fern . -drawer -keep -stay | ||
Assert Equals(winnr('$'), 2) | ||
quit | ||
sleep 1m | ||
Assert Equals(winnr('$'), 2) | ||
End | ||
|
||
It does nothing when g:fern#disable_drawer_auto_quit = 1 | ||
let g:fern#disable_drawer_auto_quit = 1 | ||
Fern . -drawer -keep -stay | ||
Assert Equals(winnr('$'), 2) | ||
quit | ||
sleep 1m | ||
Assert Equals(winnr('$'), 1) | ||
End | ||
|
||
It does nothing on 'bdelete' | ||
" NOTE: | ||
" The following two edit is required to prevent unconsistent | ||
" behaviro of bdelete in Vim | ||
edit foo | ||
edit bar | ||
Fern . -drawer -keep -stay | ||
Assert Equals(winnr('$'), 2) | ||
bdelete | ||
sleep 1m | ||
Assert Equals(winnr('$'), 1) | ||
End | ||
End | ||
End |