// We have to keep track of the cursor for prompting
cursorx int
+
+ // Is the current message a message from the gutter
+ gutterMessage bool
}
// Message sends a message to the user
m.response = string([]rune(m.response)[:m.cursorx-1]) + string(m.response[m.cursorx:])
}
m.cursorx--
- case tcell.KeySpace:
- m.response += " "
- m.cursorx++
case tcell.KeyRune:
m.response = Insert(m.response, m.cursorx, string(e.Rune()))
m.cursorx++
}
}
-const (
- GutterInfo = iota
- GutterWarning
- GutterError
-)
-
+// A GutterMessage is a message displayed on the side of the editor
type GutterMessage struct {
lineNum int
msg string
kind int
}
+
+// These are the different types of messages
+const (
+ // GutterInfo represents a simple info message
+ GutterInfo = iota
+ // GutterWarning represents a compiler warning
+ GutterWarning
+ // GutterError represents a compiler error
+ GutterError
+)