aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-01-29 20:37:28 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-01-29 20:37:48 +0800
commit950a88d4c2a9c17b5a679b4e41fab9f64b8cf9df (patch)
treea2b1444eecc8c429408b7f5d6571aba7e3fcb884 /src/nvim/window.c
parent6dcdec8042e69c151f40974486b0e3d254596e6c (diff)
downloadrneovim-950a88d4c2a9c17b5a679b4e41fab9f64b8cf9df.tar.gz
rneovim-950a88d4c2a9c17b5a679b4e41fab9f64b8cf9df.tar.bz2
rneovim-950a88d4c2a9c17b5a679b4e41fab9f64b8cf9df.zip
vim-patch:8.2.4248: no proper test for moving the window separator
Problem: No proper test for moving the window separator. Solution: Add a test. Add comment in code. (closes vim/vim#9656) https://github.com/vim/vim/commit/a0c4e2f2d7aa164d9d7692702c752ea063bd3a8c Remove the assertion as it is now possible for `fr` to be `NULL`. The test fails without clearing messages. Not sure if this is a bug.
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 1e747a67e9..8e44fd5014 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -5795,7 +5795,6 @@ void win_drag_vsep_line(win_T *dragwin, int offset)
}
fr = curfr; // put fr at window that grows
}
- assert(fr);
// Not enough room
if (room < offset) {
@@ -5808,7 +5807,9 @@ void win_drag_vsep_line(win_T *dragwin, int offset)
}
if (fr == NULL) {
- return; // Safety check, should not happen.
+ // This can happen when calling win_move_separator() on the rightmost
+ // window. Just don't do anything.
+ return;
}
// grow frame fr by offset lines