That's a great point. I believe that functionality exists with 'splitright' and 'splitbelow':
/*
* Find out which frame is going to get the freed up space when "win" is
* closed.
* if 'splitbelow'/'splitleft' the space goes to the window above/left.
* if 'nosplitbelow'/'nosplitleft' the space goes to the window below/right.
* This makes opening a window and closing it immediately keep the same window
* layout.
*/
static frame_T *
win_altframe(win, tp)
Testing seems to confirm that. If 'splitright' is on, closing a vertically-split window opens the window to the left. If 'splitbelow' is on, closing a horizontally-split window opens the window above.
By the way, the comment to win_alframe references 'splitleft', which isn't actually a setting. Do you prefer that patches only deal with one issue, or should I fix the comment in this patch?
I'm not quite sure why those extra lines were getting added in my replies. I've manually removed them.
I agree on having short names. As short as possible while capturing intent. 'tableft' could work. It seems as though if there were any options in the future having to do with tabs and direction, this might get confusing. 'tabsplitleft' seems a little confusing because we're not really splitting tabs like we do windows. I went with 'tabcloseleft' to tie it to the ':tabclose' command.
Is there something else I can fix in this patch? Or is it acceptable?
Oh awesome :) Thanks! I'll check that first next time.