cleaning up
parent
df43153110
commit
772e0aa3f9
|
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
)
|
||||
|
||||
// ColorFmt colorize a string with ansi colors.
|
||||
const ColorFmt = "\x1b[%dm%s\x1b[0m"
|
||||
|
||||
// Paint describes a terminal color.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ const (
|
|||
// DefaultLoggerTailCount tracks default log tail size.
|
||||
DefaultLoggerTailCount = 100
|
||||
// MaxLogThreshold sets the max value for log size.
|
||||
MaxLogThreshold = 5_000
|
||||
MaxLogThreshold = 5000
|
||||
// DefaultSinceSeconds tracks default log age.
|
||||
DefaultSinceSeconds = 5 * 60 // 5mins
|
||||
)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ type FishBuff struct {
|
|||
suggestionFn SuggestionFunc
|
||||
}
|
||||
|
||||
// NewFishBuffer returns a new command buffer.
|
||||
// NewFishBuff returns a new command buffer.
|
||||
func NewFishBuff(key rune, kind BufferKind) *FishBuff {
|
||||
return &FishBuff{CmdBuff: NewCmdBuff(key, kind)}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ func (l *Log) SinceSeconds() int64 {
|
|||
return l.logOptions.SinceSeconds
|
||||
}
|
||||
|
||||
// SetLogOptions updates logger options.
|
||||
func (l *Log) SetLogOptions(opts dao.LogOptions) {
|
||||
l.logOptions = opts
|
||||
l.Restart()
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ func (a *App) BufferActive(state bool, _ model.BufferKind) {
|
|||
a.Draw()
|
||||
}
|
||||
|
||||
// SuggestionChanged notifies of update to command suggestions.
|
||||
func (a *App) SuggestionChanged(ss []string) {}
|
||||
|
||||
// StylesChanged notifies the skin changed.
|
||||
|
|
|
|||
|
|
@ -190,12 +190,14 @@ func (l *Log) bindKeys() {
|
|||
})
|
||||
}
|
||||
|
||||
// SendStrokes (testing only!)
|
||||
func (l *Log) SendStrokes(s string) {
|
||||
for _, r := range s {
|
||||
l.logs.keyboard(tcell.NewEventKey(tcell.KeyRune, r, tcell.ModNone))
|
||||
}
|
||||
}
|
||||
|
||||
// SendKeys (testing only!)
|
||||
func (l *Log) SendKeys(kk ...tcell.Key) {
|
||||
for _, k := range kk {
|
||||
l.logs.keyboard(tcell.NewEventKey(k, ' ', tcell.ModNone))
|
||||
|
|
|
|||
Loading…
Reference in New Issue