import (
"runtime"
- "github.com/gdamore/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"
)
mouseReleased bool
id uint64
+ tab *Tab
}
-func NewTermPane(x, y, w, h int, t *shell.Terminal, id uint64) *TermPane {
+func NewTermPane(x, y, w, h int, t *shell.Terminal, id uint64, tab *Tab) *TermPane {
th := new(TermPane)
th.Terminal = t
th.id = id
th.mouseReleased = true
th.Window = display.NewTermWindow(x, y, w, h, t)
+ th.tab = tab
return th
}
t.id = i
}
+func (t *TermPane) SetTab(tab *Tab) {
+ t.tab = tab
+}
+
+func (t *TermPane) Tab() *Tab {
+ return t.tab
+}
+
func (t *TermPane) Close() {}
func (t *TermPane) Quit() {
clipboard.WriteAll(t.GetSelection(t.GetView().Width), "clipboard")
InfoBar.Message("Copied selection to clipboard")
} else if t.Status != shell.TTDone {
- // t.WriteString(event.EscSeq())
+ t.WriteString(event.EscSeq())
+ }
+ } else if _, ok := event.(*tcell.EventPaste); ok {
+ if t.Status != shell.TTDone {
+ t.WriteString(event.EscSeq())
}
} else if e, ok := event.(*tcell.EventMouse); e != nil && (!ok || t.State.Mode(terminal.ModeMouseMask)) {
// t.WriteString(event.EscSeq())