Something went wrong. Try again.
Fork of micro-editor/micro
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738package action
import "github.com/micro-editor/micro/v2/internal/buffer"
// InfoBar is the global info bar.var InfoBar *InfoPane
// LogBufPane is a global log buffer.var LogBufPane *BufPane
// InitGlobals initializes the log buffer and the info barfunc InitGlobals() { InfoBar = NewInfoBar() buffer.LogBuf = buffer.NewBufferFromString("", "", buffer.BTLog) buffer.LogBuf.SetName("Log")}
// GetInfoBar returns the infobar panefunc GetInfoBar() *InfoPane { return InfoBar}
// WriteLog writes a string to the log bufferfunc WriteLog(s string) { buffer.WriteLog(s) if LogBufPane != nil { LogBufPane.CursorEnd() }}
// OpenLogBuf opens the log buffer from the current bufpane// If the current bufpane is a log buffer nothing happens,// otherwise the log buffer is opened in a horizontal splitfunc (h *BufPane) OpenLogBuf() { LogBufPane = h.HSplitBuf(buffer.LogBuf) LogBufPane.CursorEnd()}