aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-08-13 21:01:00 +0100
committerSean Dewar <seandewar@users.noreply.github.com>2021-09-17 02:10:42 +0100
commite9ddff9d8a86e5e66ebbf7a37c5ae273c9471ccd (patch)
treebd47325fcf08299b1d1eb3202e4cd35ddefc80cb /src
parent423150dfa000be58c5084871e560fc1287839457 (diff)
downloadrneovim-e9ddff9d8a86e5e66ebbf7a37c5ae273c9471ccd.tar.gz
rneovim-e9ddff9d8a86e5e66ebbf7a37c5ae273c9471ccd.tar.bz2
rneovim-e9ddff9d8a86e5e66ebbf7a37c5ae273c9471ccd.zip
vim-patch:8.2.3313: unused code in win_exchange() and frame_remove()
Problem: Unused code in win_exchange() and frame_remove(). Solution: Remove the code. (closes vim/vim#8728) https://github.com/vim/vim/commit/9e2fa4bb9eb40a78a1ae1f67a4064651b5ce0aac
Diffstat (limited to 'src')
-rw-r--r--src/nvim/window.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index b68f128875..4bbdaefd1f 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -1719,21 +1719,10 @@ static void win_exchange(long Prenum)
curwin->w_vsep_width = wp->w_vsep_width;
wp->w_vsep_width = temp;
- /* If the windows are not in the same frame, exchange the sizes to avoid
- * messing up the window layout. Otherwise fix the frame sizes. */
- if (curwin->w_frame->fr_parent != wp->w_frame->fr_parent) {
- temp = curwin->w_height;
- curwin->w_height = wp->w_height;
- wp->w_height = temp;
- temp = curwin->w_width;
- curwin->w_width = wp->w_width;
- wp->w_width = temp;
- } else {
- frame_fix_height(curwin);
- frame_fix_height(wp);
- frame_fix_width(curwin);
- frame_fix_width(wp);
- }
+ frame_fix_height(curwin);
+ frame_fix_height(wp);
+ frame_fix_width(curwin);
+ frame_fix_width(wp);
(void)win_comp_pos(); // recompute window positions
@@ -4934,10 +4923,6 @@ static void frame_remove(frame_T *frp)
frp->fr_prev->fr_next = frp->fr_next;
} else {
frp->fr_parent->fr_child = frp->fr_next;
- // special case: topframe->fr_child == frp
- if (topframe->fr_child == frp) {
- topframe->fr_child = frp->fr_next;
- }
}
if (frp->fr_next != NULL) {
frp->fr_next->fr_prev = frp->fr_prev;