aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-23 20:50:11 -0400
committerhistoria <[not public]>2026-06-23 20:50:11 -0400
commitb1e252c996a6332d391f96624a7d6f149eb097c4 (patch)
treed84a117cf56b0c88b0a8a2ff6debec20de37cd69
parenta1a82c18d5f55b6a809019bd9ab7d3754d126e16 (diff)
downloadtui-ascii-mapper-b1e252c996a6332d391f96624a7d6f149eb097c4.tar.gz
fix: vertical bar rendering issue
-rw-r--r--app.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/app.go b/app.go
index 89b4438..6dcbe5c 100644
--- a/app.go
+++ b/app.go
@@ -1461,7 +1461,14 @@ func (m *AppModel) handleSidebarClick(x, y int) {
// Tools: rows 16+, then 3 brush width rows
toolRow := relY - 16
if toolRow >= 0 && toolRow < 8 {
- m.tool = Tool(toolRow)
+ newTool := Tool(toolRow)
+ if m.tool != newTool && m.mode == ModeTextEdit {
+ m.mode = ModeNormal
+ m.movingLabel = -1
+ m.textEditing = false
+ m.textInput.Blur()
+ }
+ m.tool = newTool
}
bwRow := relY - 25
if bwRow >= 0 && bwRow < 3 {
@@ -1926,7 +1933,7 @@ func (m *AppModel) renderGrid(gw, gh int) string {
}
// Live text preview with cursor
- if m.mode == ModeTextEdit {
+ if m.mode == ModeTextEdit && m.tool == ToolText {
text := m.textInput.Value()
cursorCh := ""
if m.textInput.Focused() {