summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-01-13 11:50:02 +0300
committerGrail Finder <wohilas@gmail.com>2026-01-13 11:50:02 +0300
commit05a2098e02ad9e1b42c9f58be0a19627b55ee0b8 (patch)
tree1a2c2bf522d2f24d2be35ed41b911b15890b31a9
parent0f8fdae0e4fe7f3b00de7dfdfdbbb5b8f5ded415 (diff)
Chore: newline count
-rw-r--r--tui.go32
1 files changed, 17 insertions, 15 deletions
diff --git a/tui.go b/tui.go
index f1029b7..72d456f 100644
--- a/tui.go
+++ b/tui.go
@@ -20,21 +20,21 @@ import (
var _ = sync.RWMutex{}
var (
- app *tview.Application
- pages *tview.Pages
- textArea *tview.TextArea
- editArea *tview.TextArea
- textView *tview.TextView
- statusLineWidget *tview.TextView
- helpView *tview.TextView
- flex *tview.Flex
- imgView *tview.Image
- defaultImage = "sysprompts/llama.png"
- indexPickWindow *tview.InputField
- renameWindow *tview.InputField
- roleEditWindow *tview.InputField
- fullscreenMode bool
- positionVisible bool = true
+ app *tview.Application
+ pages *tview.Pages
+ textArea *tview.TextArea
+ editArea *tview.TextArea
+ textView *tview.TextView
+ statusLineWidget *tview.TextView
+ helpView *tview.TextView
+ flex *tview.Flex
+ imgView *tview.Image
+ defaultImage = "sysprompts/llama.png"
+ indexPickWindow *tview.InputField
+ renameWindow *tview.InputField
+ roleEditWindow *tview.InputField
+ fullscreenMode bool
+ positionVisible bool = true
scrollToEndEnabled bool = true
// pages
historyPage = "historyPage"
@@ -1293,6 +1293,8 @@ func init() {
// newline is not needed is prev msg ends with one
if strings.HasSuffix(prevText, nl) {
nl = ""
+ } else if strings.HasSuffix(prevText, "\n") {
+ nl = "\n" // only one newline, add another
}
if msgText != "" {
// as what char user sends msg?