From f0d559ed648511ec8b19910694757970bebd71a5 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Fri, 18 Aug 2023 17:26:50 +0200 Subject: [PATCH] Added color tags --- editor/editor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/editor.go b/editor/editor.go index 5e2c157..8a740b8 100644 --- a/editor/editor.go +++ b/editor/editor.go @@ -80,6 +80,7 @@ func (e *Editor) newResult() *tview.TextView { e.Result.SetBackgroundColor(tcell.ColorDefault) e.Result.SetTextStyle(tcell.StyleDefault) e.Result.SetBorderPadding(0, 0, 1, 1) + e.Result.SetDynamicColors(true) e.Result.SetMouseCapture(func(action tview.MouseAction, event *tcell.EventMouse) (tview.MouseAction, *tcell.EventMouse) { if action == tview.MouseLeftClick { @@ -130,7 +131,7 @@ func (e *Editor) setDirty(dirty bool) { } func (e *Editor) load() { - source := "Press Enter to edit.\nPress Esc to preview.\nPress Ctrl + S to save.\n\n{whoami}@{hostname}" + source := "Press [lime]Enter[-] to edit.\nPress [lime]Esc[-] to preview.\nPress [lime]Ctrl S[-] to save.\n\n{whoami}@{hostname}" data, err := os.ReadFile(e.FilePath) if err == nil {