Merge pull request #687 from peco/fix-dead-code

Remove dead code
This commit is contained in:
lestrrat 2026-02-18 09:53:08 +09:00 committed by GitHub
commit 6058cbee57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 33 deletions

View file

@ -163,11 +163,6 @@ func (h *Hub) SendDraw(ctx context.Context, options *DrawOptions) {
send(ctx, h.DrawCh(), NewPayload(options, isBatchCtx(ctx)))
}
// SendPurgeDisplayCache sends a request to purge the display cache
func (h *Hub) SendPurgeDisplayCache(ctx context.Context) {
send(ctx, h.DrawCh(), NewPayload(&DrawOptions{PurgeCache: true}, isBatchCtx(ctx)))
}
// StatusMsgCh returns the channel to update the status message
func (h *Hub) StatusMsgCh() chan *Payload[StatusMsg] {
return h.statusMsgCh

View file

@ -468,11 +468,10 @@ type Buffer interface {
// MemoryBuffer is an implementation of Buffer
type MemoryBuffer struct {
done chan struct{}
doneOnce sync.Once
lines []line.Line
mutex sync.RWMutex
PeriodicFunc func()
done chan struct{}
doneOnce sync.Once
lines []line.Line
mutex sync.RWMutex
}
type ActionMap interface {

View file

@ -22,24 +22,6 @@ func QueryFromContext(ctx context.Context) string {
return v
}
func NilOutput(ctx context.Context) ChanOutput {
ch := make(chan line.Line)
go func() {
for {
select {
case <-ctx.Done():
return
case _, ok := <-ch:
if !ok {
return
}
}
}
}()
return ChanOutput(ch)
}
// OutCh returns the channel that acceptors can listen to
func (oc ChanOutput) OutCh() <-chan line.Line {
return oc

View file

@ -20,11 +20,6 @@ func (s *SingleKeyJumpState) Mode() bool {
return s.mode
}
// SetMode sets single-key jump mode on or off.
func (s *SingleKeyJumpState) SetMode(b bool) {
s.mode = b
}
// ShowPrefix returns whether jump prefixes should be displayed.
func (s *SingleKeyJumpState) ShowPrefix() bool {
return s.showPrefix