From 2d5dca15b40d207955a93cb19c033e91cc6006d7 Mon Sep 17 00:00:00 2001 From: Noboru Saito Date: Wed, 18 Oct 2023 14:00:49 +0900 Subject: [PATCH] Added setting for the number of lines in progress Added setting to stop displaying progress of line count. --- oviewer/config.go | 5 +++-- oviewer/event.go | 3 +++ oviewer/oviewer.go | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/oviewer/config.go b/oviewer/config.go index ee261af2..fdcf6905 100644 --- a/oviewer/config.go +++ b/oviewer/config.go @@ -59,8 +59,9 @@ func NewConfig() Config { }, Prompt: OVPromptConfig{ Normal: OVPromptConfigNormal{ - ShowFilename: true, - InvertColor: true, + ShowFilename: true, + InvertColor: true, + ProcessOfCount: true, }, }, } diff --git a/oviewer/event.go b/oviewer/event.go index a8c8179f..f00ca2ff 100644 --- a/oviewer/event.go +++ b/oviewer/event.go @@ -213,6 +213,9 @@ func (root *Root) sendUpdateEndNum() { if !root.hasDocChanged() { return } + if !root.Config.Prompt.Normal.ProcessOfCount && !root.Doc.BufEOF() { + return + } ev := &eventUpdateEndNum{} ev.SetEventNow() root.postEvent(ev) diff --git a/oviewer/oviewer.go b/oviewer/oviewer.go index abb2b5cb..50fcdadf 100644 --- a/oviewer/oviewer.go +++ b/oviewer/oviewer.go @@ -161,6 +161,8 @@ type OVPromptConfigNormal struct { ShowFilename bool // InvertColor controls whether the text is colored and inverted. InvertColor bool + // ProcessOfCount controls whether to display the progress of the count. + ProcessOfCount bool } // OVPromptConfig is the prompt setting.