Skip to content

Commit

Permalink
Merge pull request #454 from noborus/proccess-of-count
Browse files Browse the repository at this point in the history
Added setting for the number of lines in progress
  • Loading branch information
noborus authored Oct 19, 2023
2 parents 10d812e + 2d5dca1 commit 1a46b7d
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 1a46b7d

Please sign in to comment.