3 import "github.com/zyedidia/micro/v2/internal/buffer"
5 // InfoBar is the global info bar.
8 // LogBufPane is a global log buffer.
9 var LogBufPane *BufPane
11 // InitGlobals initializes the log buffer and the info bar
13 InfoBar = NewInfoBar()
14 buffer.LogBuf = buffer.NewBufferFromString("", "Log", buffer.BTLog)
17 // GetInfoBar returns the infobar pane
18 func GetInfoBar() *InfoPane {
22 // WriteLog writes a string to the log buffer
23 func WriteLog(s string) {
25 if LogBufPane != nil {
26 LogBufPane.CursorEnd()
30 // OpenLogBuf opens the log buffer from the current bufpane
31 // If the current bufpane is a log buffer nothing happens,
32 // otherwise the log buffer is opened in a horizontal split
33 func (h *BufPane) OpenLogBuf() {
34 LogBufPane = h.HSplitBuf(buffer.LogBuf)
35 LogBufPane.CursorEnd()