Skip to content

Commit

Permalink
Added setting for the number of lines in progress
Browse files Browse the repository at this point in the history
Added setting to stop displaying progress of line count.
  • Loading branch information
noborus committed Oct 18, 2023
1 parent 10d812e commit 2d5dca1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions oviewer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ func NewConfig() Config {
},
Prompt: OVPromptConfig{
Normal: OVPromptConfigNormal{
ShowFilename: true,
InvertColor: true,
ShowFilename: true,
InvertColor: true,
ProcessOfCount: true,
},
},
}
Expand Down
3 changes: 3 additions & 0 deletions oviewer/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions oviewer/oviewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2d5dca1

Please sign in to comment.