MCPcopy
hub / github.com/micro-editor/micro / Peek

Method Peek

internal/buffer/stack.go:38–43  ·  view source on GitHub ↗

Peek returns the top element of the stack without removing it

()

Source from the content-addressed store, hash-verified

36
37// Peek returns the top element of the stack without removing it
38func (s *TEStack) Peek() *TextEvent {
39 if s.Size > 0 {
40 return s.Top.Value
41 }
42 return nil
43}

Callers 4

UndoMethod · 0.80
RedoMethod · 0.80
TestStackFunction · 0.80
benchEditFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestStackFunction · 0.64
benchEditFunction · 0.64