From cb398e53ce490f306305cb498e32a95585625ea5 Mon Sep 17 00:00:00 2001 From: delphinus Date: Sun, 22 Mar 2026 14:39:42 +0900 Subject: [PATCH 1/2] fix: bottom position gap between float and status line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When position = "bottom" with both a tabline and a status line visible, a 1-row gap of the underlying editor content appears between the floating terminal and the status line. The SW anchor treats row as an exclusive boundary — the float occupies up to row - 1. The row was set to editor_height, which subtracts rows for both the tabline and the status line. The tabline subtraction shifted the float's bottom edge upward, creating a gap between the float and the status line. Add the status line row back to the SW anchor position (editor_height + 1). The float height calculation still uses editor_height unchanged. --- lua/termite/layout/stack.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/termite/layout/stack.lua b/lua/termite/layout/stack.lua index 274ef6c..f805d14 100644 --- a/lua/termite/layout/stack.lua +++ b/lua/termite/layout/stack.lua @@ -163,7 +163,7 @@ M.get_win_config = function(index, total) col = col, height = height, relative = "editor", - row = position == "top" and 0 or editor_height, + row = position == "top" and 0 or (editor_height + (vim.o.laststatus > 0 and 1 or 0)), style = "minimal", width = width, zindex = 50, From b557fcd5a8a12389b9f83086832905b6a17e1cae Mon Sep 17 00:00:00 2001 From: delphinus Date: Wed, 25 Mar 2026 18:22:34 +0900 Subject: [PATCH 2/2] tests: update bottom position row expectation for status line fix Co-Authored-By: Claude Opus 4.6 (1M context) --- spec/layout/stack_spec.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/layout/stack_spec.lua b/spec/layout/stack_spec.lua index de81d96..8e64559 100644 --- a/spec/layout/stack_spec.lua +++ b/spec/layout/stack_spec.lua @@ -281,8 +281,10 @@ describe("layout.stack module", function() local win_config = layout.get_win_config(1, 1) local editor_height = 50 - 1 - 1 -- 48 + -- row accounts for status line: editor_height + 1 when laststatus > 0 + local expected_row = editor_height + 1 - assert.are.equal(editor_height, win_config.row) + assert.are.equal(expected_row, win_config.row) end) it("stacks terminals horizontally from left to right", function()