MCPcopy Index your code
hub / github.com/micro-editor/micro / SetLocalCmd

Method SetLocalCmd

internal/action/command.go:732–745  ·  view source on GitHub ↗

SetLocalCmd sets an option local to the buffer

(args []string)

Source from the content-addressed store, hash-verified

730
731// SetLocalCmd sets an option local to the buffer
732func (h *BufPane) SetLocalCmd(args []string) {
733 if len(args) < 2 {
734 InfoBar.Error("Not enough arguments")
735 return
736 }
737
738 option := args[0]
739 value := args[1]
740
741 err := h.Buf.SetOption(option, value)
742 if err != nil {
743 InfoBar.Error(err)
744 }
745}
746
747func (h *BufPane) toggleOption(option string, local bool) error {
748 var curVal, newVal any

Callers

nothing calls this directly

Calls 2

SetOptionMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected