Mercurial > vim
comparison src/window.c @ 20049:8c401bc7f32b v8.2.0580
patch 8.2.0580: window size wrong if 'ea' is off and 'splitright' is on
Commit: https://github.com/vim/vim/commit/edd327cc070d9a05c12e88bc5c43a1e2a3086ae6
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Apr 15 20:05:47 2020 +0200
patch 8.2.0580: window size wrong if 'ea' is off and 'splitright' is on
Problem: Window size wrong if 'ea' is off and 'splitright' is on and
splitting then closing a window.
Solution: Put abandoned window space in the right place. (Mark Waggoner)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 15 Apr 2020 20:15:06 +0200 |
parents | 435726a03481 |
children | 06a1dd50463e |
comparison
equal
deleted
inserted
replaced
20048:a400073354d4 | 20049:8c401bc7f32b |
---|---|
2965 if (frp->fr_prev == NULL) | 2965 if (frp->fr_prev == NULL) |
2966 return frp->fr_next; | 2966 return frp->fr_next; |
2967 if (frp->fr_next == NULL) | 2967 if (frp->fr_next == NULL) |
2968 return frp->fr_prev; | 2968 return frp->fr_prev; |
2969 | 2969 |
2970 // By default the next window will get the space that was abandoned by this | |
2971 // window | |
2970 target_fr = frp->fr_next; | 2972 target_fr = frp->fr_next; |
2971 other_fr = frp->fr_prev; | 2973 other_fr = frp->fr_prev; |
2972 if (p_spr || p_sb) | 2974 |
2975 // If this is part of a column of windows and 'splitbelow' is true then the | |
2976 // previous window will get the space. | |
2977 if (frp->fr_parent != NULL && frp->fr_parent->fr_layout == FR_COL && p_sb) | |
2978 { | |
2979 target_fr = frp->fr_prev; | |
2980 other_fr = frp->fr_next; | |
2981 } | |
2982 | |
2983 // If this is part of a row of windows, and 'splitright' is true then the | |
2984 // previous window will get the space. | |
2985 if (frp->fr_parent != NULL && frp->fr_parent->fr_layout == FR_ROW && p_spr) | |
2973 { | 2986 { |
2974 target_fr = frp->fr_prev; | 2987 target_fr = frp->fr_prev; |
2975 other_fr = frp->fr_next; | 2988 other_fr = frp->fr_next; |
2976 } | 2989 } |
2977 | 2990 |