diff --git a/hub/hub.go b/hub/hub.go index e418d48..e666c3f 100644 --- a/hub/hub.go +++ b/hub/hub.go @@ -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 diff --git a/interface.go b/interface.go index 39972dd..cd49080 100644 --- a/interface.go +++ b/interface.go @@ -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 { diff --git a/pipeline/pipeline.go b/pipeline/pipeline.go index c6cfa29..1307dd2 100644 --- a/pipeline/pipeline.go +++ b/pipeline/pipeline.go @@ -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 diff --git a/state.go b/state.go index 2f93d3b..9120205 100644 --- a/state.go +++ b/state.go @@ -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