We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7b2b75 commit a99fda9Copy full SHA for a99fda9
plugin/dwm.vim
@@ -75,8 +75,17 @@ function! DWM_New()
75
endfunction
76
77
" Move the current window to the master pane (the previous master window is
78
-" added to the top of the stack)
+" added to the top of the stack). If current window is master already - switch
79
+" back to previous
80
function! DWM_Focus()
81
+ if winnr('$') == 1
82
+ return
83
+ endif
84
+
85
+ if winnr() == 1
86
+ wincmd p
87
88
89
let l:curwin = winnr()
90
call DWM_Stack(1)
91
exec l:curwin . "wincmd w"
0 commit comments