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.