From d96a5dd8fb4986069d4816a5be24c77d918f71ec Mon Sep 17 00:00:00 2001 From: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com> Date: Wed, 31 Dec 2025 20:17:21 +0100 Subject: [PATCH 1/5] fix: don't reserve space for trailing divider --- ui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui.go b/ui.go index b302fe43..381fd884 100644 --- a/ui.go +++ b/ui.go @@ -481,7 +481,7 @@ func (win *win) printDir(ui *ui, dir *dir, context *dirContext, dirStyle *dirSty // make space for select marker, and leave another space at the end maxWidth := win.w - lnwidth - 2 // make extra space to separate windows if drawbox is not enabled - if !gOpts.drawbox { + if !gOpts.drawbox && win != ui.wins[len(ui.wins)-1] { maxWidth-- } From 2eddb70e3f240efc004f5ea416e85c996f97e574 Mon Sep 17 00:00:00 2001 From: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com> Date: Wed, 31 Dec 2025 22:36:35 +0100 Subject: [PATCH 2/5] docs: update `CHANGELOG.md` --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3647866f..836bbd69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), - A bug where sixel images fail to display when scrolling back and forth is now fixed (#2301). - Newline characters are now ignored when drawing the ruler with the `ruler` file configured (#2319). - A potential crash when using the `scroll-up`/`scroll-down` commands is now fixed (#2320). +- A bug where a trailing divider space appears after the last pane with `drawbox` disabled is now fixed (#2332). ## [r40](https://github.com/gokcehan/lf/releases/tag/r40) From 9c82b470a71f00b04b46ec822dc7c74e5391874f Mon Sep 17 00:00:00 2001 From: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com> Date: Sun, 4 Jan 2026 03:27:21 +0100 Subject: [PATCH 3/5] Revert "fix: don't reserve space for trailing divider" This reverts commit d96a5dd8fb4986069d4816a5be24c77d918f71ec. --- ui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui.go b/ui.go index 381fd884..b302fe43 100644 --- a/ui.go +++ b/ui.go @@ -481,7 +481,7 @@ func (win *win) printDir(ui *ui, dir *dir, context *dirContext, dirStyle *dirSty // make space for select marker, and leave another space at the end maxWidth := win.w - lnwidth - 2 // make extra space to separate windows if drawbox is not enabled - if !gOpts.drawbox && win != ui.wins[len(ui.wins)-1] { + if !gOpts.drawbox { maxWidth-- } From a32f86abd461562dec1634f0143edc7715598706 Mon Sep 17 00:00:00 2001 From: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com> Date: Sun, 4 Jan 2026 03:39:05 +0100 Subject: [PATCH 4/5] refactor: move `getWidths()` to `misc.go` --- misc.go | 23 +++++++++++++++++++++++ ui.go | 25 +------------------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/misc.go b/misc.go index 93d0ae9e..68af7cb7 100644 --- a/misc.go +++ b/misc.go @@ -513,6 +513,29 @@ func readLines(reader io.ByteReader, maxLines int) (lines []string, binary bool, } } +func getWidths(wtot int, ratios []int, drawBox bool) []int { + rsum := 0 + for _, r := range ratios { + rsum += r + } + + wlen := len(ratios) + widths := make([]int, wlen) + + if drawBox { + wtot -= (wlen + 1) + } + + wsum := 0 + for i := range wlen - 1 { + widths[i] = ratios[i] * wtot / rsum + wsum += widths[i] + } + widths[wlen-1] = wtot - wsum + + return widths +} + // We don't need no generic code // We don't need no type control // No dark templates in compiler diff --git a/ui.go b/ui.go index b302fe43..3c588638 100644 --- a/ui.go +++ b/ui.go @@ -598,33 +598,10 @@ func getCustomWidth(dir *dir, beg, end int) int { return maxw } -func getWidths(wtot int) []int { - rsum := 0 - for _, r := range gOpts.ratios { - rsum += r - } - - wlen := len(gOpts.ratios) - widths := make([]int, wlen) - - if gOpts.drawbox { - wtot -= (wlen + 1) - } - - wsum := 0 - for i := range wlen - 1 { - widths[i] = gOpts.ratios[i] * wtot / rsum - wsum += widths[i] - } - widths[wlen-1] = wtot - wsum - - return widths -} - func getWins(screen tcell.Screen) []*win { wtot, htot := screen.Size() - widths := getWidths(wtot) + widths := getWidths(wtot, gOpts.ratios, gOpts.drawbox) wacc := 0 wlen := len(widths) From b01406ed4cfd7055641d8c20e9d11ea5f1fe8a98 Mon Sep 17 00:00:00 2001 From: CatsDeservePets <145048791+CatsDeservePets@users.noreply.github.com> Date: Sun, 4 Jan 2026 03:41:55 +0100 Subject: [PATCH 5/5] docs: update `CHANGELOG.md` --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 836bbd69..311ff2d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), - Newline characters are now ignored when drawing the ruler with the `ruler` file configured (#2319). - A potential crash when using the `scroll-up`/`scroll-down` commands is now fixed (#2320). - A bug where a trailing divider space appears after the last pane with `drawbox` disabled is now fixed (#2332). +- Case-insensitive command-line completions no longer cause user input to be displayed in lowercase (#2336). ## [r40](https://github.com/gokcehan/lf/releases/tag/r40)