diff options
| author | historia <[not public]> | 2026-06-23 20:50:11 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-23 20:50:11 -0400 |
| commit | b1e252c996a6332d391f96624a7d6f149eb097c4 (patch) | |
| tree | d84a117cf56b0c88b0a8a2ff6debec20de37cd69 /app.go | |
| parent | a1a82c18d5f55b6a809019bd9ab7d3754d126e16 (diff) | |
| download | tui-ascii-mapper-b1e252c996a6332d391f96624a7d6f149eb097c4.tar.gz | |
fix: vertical bar rendering issue
Diffstat (limited to 'app.go')
| -rw-r--r-- | app.go | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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() { |
