3 import "github.com/zyedidia/micro/v2/internal/buffer"
6 var LogBufPane *BufPane
8 // InitGlobals initializes the log buffer and the info bar
10 InfoBar = NewInfoBar()
11 buffer.LogBuf = buffer.NewBufferFromString("", "Log", buffer.BTLog)
14 // GetInfoBar returns the infobar pane
15 func GetInfoBar() *InfoPane {
19 // WriteLog writes a string to the log buffer
20 func WriteLog(s string) {
22 if LogBufPane != nil {
23 LogBufPane.CursorEnd()
27 // OpenLogBuf opens the log buffer from the current bufpane
28 // If the current bufpane is a log buffer nothing happens,
29 // otherwise the log buffer is opened in a horizontal split
30 func (h *BufPane) OpenLogBuf() {
31 LogBufPane = h.HSplitBuf(buffer.LogBuf)
32 LogBufPane.CursorEnd()