Fix windows errors

This commit is contained in:
Zachary Yedidia
2018-01-04 21:46:44 -05:00
parent d82867ee53
commit 770cb87f7a
5 changed files with 6 additions and 7 deletions

6
.gitmodules vendored
View File

@@ -55,9 +55,9 @@
[submodule "cmd/micro/vendor/github.com/flynn/json5"]
path = cmd/micro/vendor/github.com/flynn/json5
url = https://github.com/flynn/json5
[submodule "cmd/micro/vendor/github.com/james4k/terminal"]
path = cmd/micro/vendor/github.com/james4k/terminal
url = https://github.com/james4k/terminal
[submodule "cmd/micro/vendor/github.com/kr/pty"]
path = cmd/micro/vendor/github.com/kr/pty
url = https://github.com/kr/pty
[submodule "cmd/micro/vendor/github.com/zyedidia/terminal"]
path = cmd/micro/vendor/github.com/zyedidia/terminal
url = https://github.com/zyedidia/terminal

View File

@@ -9,8 +9,8 @@ import (
"strings"
"time"
"github.com/james4k/terminal"
"github.com/zyedidia/tcell"
"github.com/zyedidia/terminal"
)
// The ViewType defines what kind of view this is
@@ -557,7 +557,7 @@ func (v *View) SetCursor(c *Cursor) bool {
// HandleEvent handles an event passed by the main loop
func (v *View) HandleEvent(event tcell.Event) {
if v.Type == vtTerm {
if _, ok := event.(*tcell.EventMouse); !ok {
if _, ok := event.(*tcell.EventMouse); !ok || v.termState.Mode(terminal.ModeMouseMask) {
v.pty.WriteString(event.EscSeq())
}
return

View File

@@ -24,7 +24,6 @@ type MultiRule struct {
func JoinRule(rule string) string {
split := strings.Split(rule, `" "`)
joined := strings.Join(split, "|")
joined = joined
return joined
}