From 81cee3b10ac9e760e06478f61a1144df55cfd6e2 Mon Sep 17 00:00:00 2001 From: ruinivist Date: Sun, 1 Feb 2026 03:08:38 +0000 Subject: [PATCH] fix: fsTree min width less than actual ( hack ) --- internal/ui/note/model.go | 4 ++-- layout.go | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/ui/note/model.go b/internal/ui/note/model.go index 79a7b8f..a2f95ef 100644 --- a/internal/ui/note/model.go +++ b/internal/ui/note/model.go @@ -69,7 +69,7 @@ func newMdRenderer() *glamour.TermRenderer { // styling in glamour can be better, I would rather have a fluent style api here // https://github.com/charmbracelet/glamour/issues/294 mdStyleConfig := glStyles.TokyoNightStyleConfig - var margin uint = 2 + var margin uint = 4 mdStyleConfig.Document.Margin = &margin mdStyleConfig.Document.BlockPrefix = "" mdStyleConfig.Document.BlockSuffix = "" @@ -369,5 +369,5 @@ func (m NoteView) renderNote() string { title += "\n" } - return title + body + return "\n\n" + title + body } diff --git a/layout.go b/layout.go index c6c78a2..69d241c 100644 --- a/layout.go +++ b/layout.go @@ -13,6 +13,9 @@ const ( // getUpdatedWindowSizes computes the widths for the file tree and note view // based on the terminal dimensions and the desired tree width. func getUpdatedWindowSizes(totalWidth, requestedTreeWidth, minTreeWidth int) (treeWidth, noteWidth int) { + // hack on next line, it's not quite correct and I won't investigate rn + minTreeWidth = minTreeWidth + 3 + treeWidth = requestedTreeWidth if treeWidth == 0 {