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

Function findEvent

internal/action/bindings.go:229–244  ·  view source on GitHub ↗
(k string)

Source from the content-addressed store, hash-verified

227}
228
229func findEvent(k string) (Event, error) {
230 var event Event
231 event, ok, err := findEvents(k)
232 if err != nil {
233 return nil, err
234 }
235
236 if !ok {
237 event, ok = findSingleEvent(k)
238 if !ok {
239 return nil, errors.New(k + " is not a bindable event")
240 }
241 }
242
243 return event, nil
244}
245
246func eventsEqual(e1 Event, e2 Event) bool {
247 seq1, ok1 := e1.(KeySequenceEvent)

Callers 4

BindKeyFunction · 0.85
TryBindKeyFunction · 0.85
UnbindKeyFunction · 0.85
ShowKeyCmdMethod · 0.85

Calls 2

findEventsFunction · 0.85
findSingleEventFunction · 0.85

Tested by

no test coverage detected