summaryrefslogtreecommitdiff
path: root/tui.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-12-03 10:12:42 +0300
committerGrail Finder <wohilas@gmail.com>2025-12-03 10:12:42 +0300
commit665c353ed23c768da7c62359e3894edf1047b9bc (patch)
tree0e2b98f7c923167e4a21915770bbcc33ace57e57 /tui.go
parent5e6bc40853d2f76b0b6622c0e5c09c64fb22c954 (diff)
Fix: update tview on change (app.draw)
Diffstat (limited to 'tui.go')
-rw-r--r--tui.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/tui.go b/tui.go
index ff63ed7..cf2692f 100644
--- a/tui.go
+++ b/tui.go
@@ -312,8 +312,6 @@ var searchIndex int
var searchText string
var originalTextForSearch string
-
-
// performSearch searches for the given term in the textView content and highlights matches
func performSearch(term string) {
searchText = term
@@ -388,8 +386,6 @@ func highlightCurrentMatch() {
}
}
-
-
// showSearchBar shows the search input field as an overlay
func showSearchBar() {
// Create a temporary flex to combine search and main content
@@ -451,9 +447,6 @@ func addRegionTags(text string, positions []int, lengths []int, currentIdx int,
return result.String()
}
-
-
-
// searchNext finds the next occurrence of the search term
func searchNext() {
if len(searchResults) == 0 {
@@ -491,7 +484,10 @@ func init() {
textArea.SetBorder(true).SetTitle("input")
textView = tview.NewTextView().
SetDynamicColors(true).
- SetRegions(true)
+ SetRegions(true).
+ SetChangedFunc(func() {
+ app.Draw()
+ })
//
flex = tview.NewFlex().SetDirection(tview.FlexRow).
AddItem(textView, 0, 40, false).