diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-10 16:40:07 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-10 22:32:13 +1100 |
commit | 5c518eda0a994e49dec6f63c74ccd38b9e1b6e74 (patch) | |
tree | b58d17f1df51a7c0eda2211d08f6baa8bfe58548 /vendor/github.com | |
parent | df72eee2013ce6fa1b1bf708cdc1d6289c7343b6 (diff) |
bump gocui (this better work or so hope me god I'm switching back to go dep)
jks I'm that that close to the edge... but I am getting there haha
Diffstat (limited to 'vendor/github.com')
-rw-r--r-- | vendor/github.com/jesseduffield/gocui/keybinding.go | 5 | ||||
-rw-r--r-- | vendor/github.com/jesseduffield/gocui/view.go | 11 | ||||
-rw-r--r-- | vendor/github.com/jesseduffield/pty/types.go | 10 | ||||
-rw-r--r-- | vendor/github.com/jesseduffield/pty/types_dragonfly.go | 17 | ||||
-rw-r--r-- | vendor/github.com/jesseduffield/pty/types_freebsd.go | 15 | ||||
-rw-r--r-- | vendor/github.com/jesseduffield/pty/types_openbsd.go | 14 | ||||
-rw-r--r-- | vendor/github.com/jesseduffield/termbox-go/syscalls.go | 39 | ||||
-rw-r--r-- | vendor/github.com/ulikunitz/xz/example.go | 40 |
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) + } +} |