Gutter message support

This commit is contained in:
Zachary Yedidia
2019-01-13 17:22:11 -05:00
parent 15afb75984
commit ca1df2d7fd
6 changed files with 653 additions and 510 deletions

View File

@@ -166,6 +166,20 @@ func (h *BufHandler) HandleEvent(event tcell.Event) {
h.DoMouseEvent(me, e)
}
h.Buf.MergeCursors()
// Display any gutter messages for this line
c := h.Buf.GetActiveCursor()
none := true
for _, m := range h.Buf.Messages {
if c.Y == m.Start.Y || c.Y == m.End.Y {
InfoBar.GutterMessage(m.Msg)
none = false
break
}
}
if none && InfoBar.HasGutter {
InfoBar.ClearGutter()
}
}
// DoKeyEvent executes a key event by finding the action it is bound