feat: allow moving tabs to empty splits

This commit is contained in:
CJ van den Berg 2026-02-04 09:53:18 +01:00
parent 2d2d8a915b
commit cc2aabf7dd
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 26 additions and 18 deletions

View file

@ -1792,7 +1792,7 @@ fn remove_view(self: *Self, view: usize) void {
const buffers = self.buffer_manager.list_unordered(self.allocator) catch @panic("OOM remove_view");
defer self.allocator.free(buffers);
for (buffers) |buffer| if (buffer.get_last_view()) |buffer_view|
if (buffer_view >= view)
if (buffer_view > view)
buffer.set_last_view(buffer_view - 1);
}