Mercurial > vim
comparison src/window.c @ 27440:1118a65c9bc7
patch 8.2.4248: no proper test for moving the window separator
Commit: https://github.com/vim/vim/commit/a0c4e2f2d7aa164d9d7692702c752ea063bd3a8c
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sat Jan 29 10:59:53 2022 +0000
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 https://github.com/vim/vim/issues/9656)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 29 Jan 2022 12:00:06 +0100 |
parents | 41e0dcf38521 |
children | d4921b91542c |
comparison
equal
deleted
inserted
replaced
27439:996b7602c7fa | 27440:1118a65c9bc7 |
---|---|
6185 if (room < offset) // Not enough room | 6185 if (room < offset) // Not enough room |
6186 offset = room; // Move as far as we can | 6186 offset = room; // Move as far as we can |
6187 if (offset <= 0) // No room at all, quit. | 6187 if (offset <= 0) // No room at all, quit. |
6188 return; | 6188 return; |
6189 if (fr == NULL) | 6189 if (fr == NULL) |
6190 return; // Safety check, should not happen. | 6190 // This can happen when calling win_move_separator() on the rightmost |
6191 // window. Just don't do anything. | |
6192 return; | |
6191 | 6193 |
6192 // grow frame fr by offset lines | 6194 // grow frame fr by offset lines |
6193 frame_new_width(fr, fr->fr_width + offset, left, FALSE); | 6195 frame_new_width(fr, fr->fr_width + offset, left, FALSE); |
6194 | 6196 |
6195 // shrink other frames: current and at the left or at the right | 6197 // shrink other frames: current and at the left or at the right |