From 6479ff2e348326ee93763258a8ec34d95129c94c Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 25 Apr 2022 00:25:49 +0300 Subject: [PATCH] Add option to disable clearing screen Somewhat hacky and might cause other issues, but should fix #365 --- config/config.go | 3 +++ go.mod | 2 +- go.sum | 4 ++-- ui/ui.go | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index 5829591..711db1b 100644 --- a/config/config.go +++ b/config/config.go @@ -116,6 +116,8 @@ type Config struct { Backspace1RemovesWord bool `yaml:"backspace1_removes_word"` Backspace2RemovesWord bool `yaml:"backspace2_removes_word"` + AlwaysClearScreen bool `yaml:"always_clear_screen"` + Dir string `yaml:"-"` DataDir string `yaml:"data_dir"` CacheDir string `yaml:"cache_dir"` @@ -152,6 +154,7 @@ func NewConfig(configDir, dataDir, cacheDir, downloadDir string) *Config { NotifySound: true, SendToVerifiedOnly: false, Backspace1RemovesWord: true, + AlwaysClearScreen: true, } } diff --git a/go.mod b/go.mod index c2cb7b9..f0c2256 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/zyedidia/clipboard v1.0.3 go.etcd.io/bbolt v1.3.6 go.mau.fi/cbind v0.0.0-20220415094356-e1d579b7925e - go.mau.fi/mauview v0.1.4-0.20220417205338-69b850bc4440 + go.mau.fi/mauview v0.1.4-0.20220424212347-bfa59b8f6ad0 go.mau.fi/tcell v0.0.0-20220417202829-9f14d62226c5 golang.org/x/image v0.0.0-20220413100746-70e8d0d3baa9 golang.org/x/net v0.0.0-20220412020605-290c469a71a5 diff --git a/go.sum b/go.sum index d26d0b0..e1d91dd 100644 --- a/go.sum +++ b/go.sum @@ -63,8 +63,8 @@ go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.mau.fi/cbind v0.0.0-20220415094356-e1d579b7925e h1:zY4TZmHAaUhrMFJQfh02dqxDYSfnnXlw/qRoFanxZTw= go.mau.fi/cbind v0.0.0-20220415094356-e1d579b7925e/go.mod h1:9nnzlslhUo/xO+8tsQgkFqG/W+SgD+r0iTYAuglzlmA= -go.mau.fi/mauview v0.1.4-0.20220417205338-69b850bc4440 h1:DegGruuno4o8/+cc9/Vck11amgHY0jXoCEdjnt05eIA= -go.mau.fi/mauview v0.1.4-0.20220417205338-69b850bc4440/go.mod h1:6bDnPL+UUkFvg0ueTlBQr1VcQwWJ4v8c+1ezoAG/Q5w= +go.mau.fi/mauview v0.1.4-0.20220424212347-bfa59b8f6ad0 h1:ln2H+b3fxErpUVu+TyFKb0Gq3zMQdIanTlsQqt5SSDo= +go.mau.fi/mauview v0.1.4-0.20220424212347-bfa59b8f6ad0/go.mod h1:6bDnPL+UUkFvg0ueTlBQr1VcQwWJ4v8c+1ezoAG/Q5w= go.mau.fi/tcell v0.0.0-20220415093808-07c67d224693/go.mod h1:HQLPCz9v8YfYewMetOKrg9pe87XEyNcIfCYYq8VxQbU= go.mau.fi/tcell v0.0.0-20220417202829-9f14d62226c5 h1:JhL64rfGvgjnaaVmUTcG46hW9L48hxLlWtsIvQKeARY= go.mau.fi/tcell v0.0.0-20220417202829-9f14d62226c5/go.mod h1:Nq9HUYmTdDVZnEyh5xzJR9tdamalR1yzAxq9BClI8EY= diff --git a/ui/ui.go b/ui/ui.go index c16b041..370aa75 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -67,6 +67,7 @@ func NewGomuksUI(gmx ifc.Gomuks) ifc.GomuksUI { func (ui *GomuksUI) Init() { mauview.Backspace2RemovesWord = ui.gmx.Config().Backspace2RemovesWord mauview.Backspace1RemovesWord = ui.gmx.Config().Backspace1RemovesWord + ui.app.SetAlwaysClear(ui.gmx.Config().AlwaysClearScreen) clipboard.Initialize() ui.views = map[View]mauview.Component{ ViewLogin: ui.NewLoginView(),