Add support for plugin manager within micro

This commit is contained in:
Zachary Yedidia
2020-02-02 14:20:39 -05:00
parent 09ea82c97e
commit b0624cb66e
6 changed files with 190 additions and 129 deletions

View File

@@ -111,6 +111,11 @@ func (eh *EventHandler) ApplyDiff(new string) {
// Insert creates an insert text event and executes it
func (eh *EventHandler) Insert(start Loc, textStr string) {
text := []byte(textStr)
eh.InsertBytes(start, text)
}
// InsertBytes creates an insert text event and executes it
func (eh *EventHandler) InsertBytes(start Loc, text []byte) {
e := &TextEvent{
C: *eh.cursors[eh.active],
EventType: TextEventInsert,