]> git.lizzy.rs Git - micro.git/blobdiff - internal/action/bufpane.go
Add "paste" option to enable aggressive pasting
[micro.git] / internal / action / bufpane.go
index 138cd3f283663d886c701e72ff4d44cb6701151a..f3a734daf848165c410cd3e3280d5acbe2b2701f 100644 (file)
@@ -6,13 +6,13 @@ import (
 
        luar "layeh.com/gopher-luar"
 
-       "github.com/gdamore/tcell"
        lua "github.com/yuin/gopher-lua"
        "github.com/zyedidia/micro/internal/buffer"
        "github.com/zyedidia/micro/internal/config"
        "github.com/zyedidia/micro/internal/display"
        ulua "github.com/zyedidia/micro/internal/lua"
        "github.com/zyedidia/micro/internal/screen"
+       "github.com/zyedidia/tcell"
 )
 
 type BufKeyAction func(*BufPane) bool
@@ -261,14 +261,14 @@ func (h *BufPane) HandleEvent(event tcell.Event) {
        }
 
        switch e := event.(type) {
-       // case *tcell.EventRaw:
-       //      re := RawEvent{
-       //              esc: e.EscSeq(),
-       //      }
-       //      h.DoKeyEvent(re)
-       // case *tcell.EventPaste:
-       //      h.paste(e.Text())
-       //      h.Relocate()
+       case *tcell.EventRaw:
+               re := RawEvent{
+                       esc: e.EscSeq(),
+               }
+               h.DoKeyEvent(re)
+       case *tcell.EventPaste:
+               h.paste(e.Text())
+               h.Relocate()
        case *tcell.EventKey:
                ke := KeyEvent{
                        code: e.Key(),