diff --git a/internal/action/rawpane.go b/internal/action/rawpane.go index 58320ea2..cdeade47 100644 --- a/internal/action/rawpane.go +++ b/internal/action/rawpane.go @@ -1,11 +1,12 @@ package action import ( + "fmt" "reflect" - "github.com/zyedidia/tcell" "github.com/zyedidia/micro/internal/buffer" "github.com/zyedidia/micro/internal/display" + "github.com/zyedidia/tcell" ) type RawPane struct { @@ -34,7 +35,6 @@ func (h *RawPane) HandleEvent(event tcell.Event) { } h.Buf.Insert(h.Cursor.Loc, reflect.TypeOf(event).String()[7:]) - // h.Buf.Insert(h.Cursor.Loc, fmt.Sprintf(": %q\n", event.EscSeq())) - h.Buf.Insert(h.Cursor.Loc, "\n") + h.Buf.Insert(h.Cursor.Loc, fmt.Sprintf(": %q\n", event.EscSeq())) h.Relocate() } diff --git a/internal/action/termpane.go b/internal/action/termpane.go index 8d511f9b..b5a2da52 100644 --- a/internal/action/termpane.go +++ b/internal/action/termpane.go @@ -3,11 +3,11 @@ package action import ( "runtime" - "github.com/zyedidia/tcell" "github.com/zyedidia/clipboard" "github.com/zyedidia/micro/internal/display" "github.com/zyedidia/micro/internal/screen" "github.com/zyedidia/micro/internal/shell" + "github.com/zyedidia/tcell" "github.com/zyedidia/terminal" ) @@ -78,10 +78,10 @@ func (t *TermPane) HandleEvent(event tcell.Event) { clipboard.WriteAll(t.GetSelection(t.GetView().Width), "clipboard") InfoBar.Message("Copied selection to clipboard") } else if t.Status != shell.TTDone { - t.WriteString(string(e.Rune())) + t.WriteString(event.EscSeq()) } } else if e, ok := event.(*tcell.EventMouse); e != nil && (!ok || t.State.Mode(terminal.ModeMouseMask)) { - // t.WriteString(event.EscSeq()) + t.WriteString(event.EscSeq()) } else if e != nil { x, y := e.Position() v := t.GetView()