summaryrefslogtreecommitdiffstats
path: root/vendor/github.com
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com')
-rw-r--r--vendor/github.com/jesseduffield/gocui/keybinding.go5
-rw-r--r--vendor/github.com/jesseduffield/gocui/view.go11
-rw-r--r--vendor/github.com/jesseduffield/pty/types.go10
-rw-r--r--vendor/github.com/jesseduffield/pty/types_dragonfly.go17
-rw-r--r--vendor/github.com/jesseduffield/pty/types_freebsd.go15
-rw-r--r--vendor/github.com/jesseduffield/pty/types_openbsd.go14
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/syscalls.go39
-rw-r--r--vendor/github.com/ulikunitz/xz/example.go40
8 files changed, 149 insertions, 2 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/keybinding.go b/vendor/github.com/jesseduffield/gocui/keybinding.go
index 01a09ce8f..6b40a66a5 100644
--- a/vendor/github.com/jesseduffield/gocui/keybinding.go
+++ b/vendor/github.com/jesseduffield/gocui/keybinding.go
@@ -136,6 +136,7 @@ type Modifier termbox.Modifier
// Modifiers.
const (
- ModNone Modifier = Modifier(0)
- ModAlt = Modifier(termbox.ModAlt)
+ ModNone Modifier = Modifier(0)
+ ModAlt = Modifier(termbox.ModAlt)
+ ModMotion = Modifier(termbox.ModMotion)
)
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go
index cd4c12f19..7dbe1519a 100644
--- a/vendor/github.com/jesseduffield/gocui/view.go
+++ b/vendor/github.com/jesseduffield/gocui/view.go
@@ -650,3 +650,14 @@ func (v *View) GetClickedTabIndex(x int) int {
return 0
}
+
+func (v *View) SelectedLineIdx() int {
+ _, seletedLineIdx := v.SelectedPoint()
+ return seletedLineIdx
+}
+
+func (v *View) SelectedPoint() (int, int) {
+ cx, cy := v.Cursor()
+ ox, oy := v.Origin()
+ return cx + ox, cy + oy
+}
diff --git a/vendor/github.com/jesseduffield/pty/types.go b/vendor/github.com/jesseduffield/pty/types.go
new file mode 100644
index 000000000..5aecb6bcd
--- /dev/null
+++ b/vendor/github.com/jesseduffield/pty/types.go
@@ -0,0 +1,10 @@
+// +build ignore
+
+package pty
+
+import "C"
+
+type (
+ _C_int C.int
+ _C_uint C.uint
+)
diff --git a/vendor/github.com/jesseduffield/pty/types_dragonfly.go b/vendor/github.com/jesseduffield/pty/types_dragonfly.go
new file mode 100644
index 000000000..5c0493b85
--- /dev/null
+++ b/vendor/github.com/jesseduffield/pty/types_dragonfly.go
@@ -0,0 +1,17 @@
+// +build ignore
+
+package pty
+
+/*
+#define _KERNEL
+#include <sys/conf.h>
+#include <sys/param.h>
+#include <sys/filio.h>
+*/
+import "C"
+
+const (
+ _C_SPECNAMELEN = C.SPECNAMELEN /* max length of devicename */
+)
+
+type fiodgnameArg C.struct_fiodname_args
diff --git a/vendor/github.com/jesseduffield/pty/types_freebsd.go b/vendor/github.com/jesseduffield/pty/types_freebsd.go
new file mode 100644
index 000000000..ce3eb9518
--- /dev/null
+++ b/vendor/github.com/jesseduffield/pty/types_freebsd.go
@@ -0,0 +1,15 @@
+// +build ignore
+
+package pty
+
+/*
+#include <sys/param.h>
+#include <sys/filio.h>
+*/
+import "C"
+
+const (
+ _C_SPECNAMELEN = C.SPECNAMELEN /* max length of devicename */
+)
+
+type fiodgnameArg C.struct_fiodgname_arg
diff --git a/vendor/github.com/jesseduffield/pty/types_openbsd.go b/vendor/github.com/jesseduffield/pty/types_openbsd.go
new file mode 100644
index 000000000..47701b5f9
--- /dev/null
+++ b/vendor/github.com/jesseduffield/pty/types_openbsd.go
@@ -0,0 +1,14 @@
+// +build ignore
+
+package pty
+
+/*
+#include <sys/time.h>
+#include <stdlib.h>
+#include <sys/tty.h>
+*/
+import "C"
+
+type ptmget C.struct_ptmget
+
+var ioctl_PTMGET = C.PTMGET
diff --git a/vendor/github.com/jesseduffield/termbox-go/syscalls.go b/vendor/github.com/jesseduffield/termbox-go/syscalls.go
new file mode 100644
index 000000000..4f52bb9af
--- /dev/null
+++ b/vendor/github.com/jesseduffield/termbox-go/syscalls.go
@@ -0,0 +1,39 @@
+// +build ignore
+
+package termbox
+
+/*
+#include <termios.h>
+#include <sys/ioctl.h>
+*/
+import "C"
+
+type syscall_Termios C.struct_termios
+
+const (
+ syscall_IGNBRK = C.IGNBRK
+ syscall_BRKINT = C.BRKINT
+ syscall_PARMRK = C.PARMRK
+ syscall_ISTRIP = C.ISTRIP
+ syscall_INLCR = C.INLCR
+ syscall_IGNCR = C.IGNCR
+ syscall_ICRNL = C.ICRNL
+ syscall_IXON = C.IXON
+ syscall_OPOST = C.OPOST
+ syscall_ECHO = C.ECHO
+ syscall_ECHONL = C.ECHONL
+ syscall_ICANON = C.ICANON
+ syscall_ISIG = C.ISIG
+ syscall_IEXTEN = C.IEXTEN
+ syscall_CSIZE = C.CSIZE
+ syscall_PARENB = C.PARENB
+ syscall_CS8 = C.CS8
+ syscall_VMIN = C.VMIN
+ syscall_VTIME = C.VTIME
+
+ // on darwin change these to (on *bsd too?):
+ // C.TIOCGETA
+ // C.TIOCSETA
+ syscall_TCGETS = C.TCGETS
+ syscall_TCSETS = C.TCSETS
+)
diff --git a/vendor/github.com/ulikunitz/xz/example.go b/vendor/github.com/ulikunitz/xz/example.go
new file mode 100644
index 000000000..855e60aee
--- /dev/null
+++ b/vendor/github.com/ulikunitz/xz/example.go
@@ -0,0 +1,40 @@
+// Copyright 2014-2017 Ulrich Kunitz. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build ignore
+
+package main
+
+import (
+ "bytes"
+ "io"
+ "log"
+ "os"
+
+ "github.com/ulikunitz/xz"
+)
+
+func main() {
+ const text = "The quick brown fox jumps over the lazy dog.\n"
+ var buf bytes.Buffer
+ // compress text
+ w, err := xz.NewWriter(&buf)
+ if err != nil {
+ log.Fatalf("xz.NewWriter error %s", err)
+ }
+ if _, err := io.WriteString(w, text); err != nil {
+ log.Fatalf("WriteString error %s", err)
+ }
+ if err := w.Close(); err != nil {
+ log.Fatalf("w.Close error %s", err)
+ }
+ // decompress buffer and write output to stdout
+ r, err := xz.NewReader(&buf)
+ if err != nil {
+ log.Fatalf("NewReader error %s", err)
+ }
+ if _, err = io.Copy(os.Stdout, r); err != nil {
+ log.Fatalf("io.Copy error %s", err)
+ }
+}