Added color tags
This commit is contained in:
parent
4a230cb68c
commit
f0d559ed64
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user