You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you load a previous session saved with a layout from the dwm plugin that looks like this
=====================================
| | B |
| |====================|
| A | C |
| |====================|
| | D |
=====================================
Each window, past the third will be a copy of the third window, and the buffers will be rotated so that whatever buffer was last is now master, the second to last is now second and Master is now in the third slot Like below
=====================================
| | C |
| |====================|
| D | A |
| |====================|
| | A |
=====================================
The buffer B will still be in the bufferlist but it will no longer be open in a window.
This is something that happens on the loading of the session. If the session is loaded without plugins you can see that it will load correctly. I also tested this with no other plugins besides vim-plug and dwm active and the problem persists.
The text was updated successfully, but these errors were encountered:
I actually figured out a solution. The dwm autocommand needs to be toggled off when a session is being loaded and then turned back on when the session is done being loaded. The following can be accomplished by adding this to the bottom of the code.
function! ToggleDwmAutogroup()
if !exists('#dwm#BufWinEnter')
augroup dwm
au!
au BufWinEnter * if &l:buflisted || &l:filetype == 'help' | call DWM_AutoEnter() | endif
augroup end
else
augroup dwm
au!
augroup end
endif
endfunction
au VimEnter * au SourcePre * call ToggleDwmAutogroup()
au VimEnter * au SourcePost * call ToggleDwmAutogroup()
An alternate solution, which I didn't see until I began typing this comment is to use the pull request from delphinus but change it from a buffer variable to a global variable (that is change b: to g:) and do the let command instead of calling the function.
If you load a previous session saved with a layout from the dwm plugin that looks like this
Each window, past the third will be a copy of the third window, and the buffers will be rotated so that whatever buffer was last is now master, the second to last is now second and Master is now in the third slot Like below
The buffer B will still be in the bufferlist but it will no longer be open in a window.
This is something that happens on the loading of the session. If the session is loaded without plugins you can see that it will load correctly. I also tested this with no other plugins besides vim-plug and dwm active and the problem persists.
The text was updated successfully, but these errors were encountered: