summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-04-15 09:37:04 +1000
committerJesse Duffield <jessedduffield@gmail.com>2022-04-16 15:19:32 +1000
commit6a153acc8f5695b9176a8d1b196dfd9eeb5ee34e (patch)
treee21b6f338c59b9db08c5270bcf78e208b3fb2765 /vendor
parentb3e18bd2581eca765f55a6f7ba5c82435fb67336 (diff)
clearer highlighting of current line
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/jesseduffield/gocui/escape.go5
-rw-r--r--vendor/github.com/jesseduffield/gocui/gui.go5
-rw-r--r--vendor/github.com/jesseduffield/gocui/view.go26
-rw-r--r--vendor/golang.org/x/sys/cpu/byteorder.go1
-rw-r--r--vendor/golang.org/x/sys/cpu/cpu_loong64.go13
-rw-r--r--vendor/golang.org/x/sys/unix/asm_linux_loong64.s54
-rw-r--r--vendor/golang.org/x/sys/unix/mkerrors.sh2
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux.go5
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux.go7
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_linux.go43
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux.go46
-rw-r--r--vendor/golang.org/x/term/term.go10
-rw-r--r--vendor/modules.txt6
13 files changed, 195 insertions, 28 deletions
diff --git a/vendor/github.com/jesseduffield/gocui/escape.go b/vendor/github.com/jesseduffield/gocui/escape.go
index a9739f641..0085d0eb4 100644
--- a/vendor/github.com/jesseduffield/gocui/escape.go
+++ b/vendor/github.com/jesseduffield/gocui/escape.go
@@ -19,11 +19,6 @@ type escapeInterpreter struct {
instruction instruction
}
-const (
- NONE = 1 << iota
- ERASE_IN_LINE
-)
-
type (
escapeState int
fontEffect int
diff --git a/vendor/github.com/jesseduffield/gocui/gui.go b/vendor/github.com/jesseduffield/gocui/gui.go
index 880f9dc93..ba8d93ce2 100644
--- a/vendor/github.com/jesseduffield/gocui/gui.go
+++ b/vendor/github.com/jesseduffield/gocui/gui.go
@@ -631,7 +631,6 @@ func (g *Gui) SetManagerFunc(manager func(*Gui) error) {
// MainLoop runs the main loop until an error is returned. A successful
// finish should return ErrQuit.
func (g *Gui) MainLoop() error {
-
g.StartTime = time.Now()
if g.PlayMode == REPLAYING {
go g.replayRecording()
@@ -916,9 +915,6 @@ func (g *Gui) drawTitle(v *View, fgColor, bgColor Attribute) error {
if v != g.currentView {
currentFgColor -= AttrBold
}
- if v.HighlightSelectedTabWithoutFocus || v == g.CurrentView() {
- currentBgColor = v.SelBgColor
- }
}
if err := g.SetRune(x, v.y0, ch, currentFgColor, currentBgColor); err != nil {
return err
@@ -982,7 +978,6 @@ func (g *Gui) drawListFooter(v *View, fgColor, bgColor Attribute) error {
// flush updates the gui, re-drawing frames and buffers.
func (g *Gui) flush() error {
-
// pretty sure we don't need this, but keeping it here in case we get weird visual artifacts
// g.clear(g.FgColor, g.BgColor)
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go
index 372da55ef..cb735bd73 100644
--- a/vendor/github.com/jesseduffield/gocui/view.go
+++ b/vendor/github.com/jesseduffield/gocui/view.go
@@ -25,11 +25,9 @@ const (
RIGHT = 8 // view is overlapping at right edge
)
-var (
- // ErrInvalidPoint is returned when client passed invalid coordinates of a cell.
- // Most likely client has passed negative coordinates of a cell.
- ErrInvalidPoint = errors.New("invalid point")
-)
+// ErrInvalidPoint is returned when client passed invalid coordinates of a cell.
+// Most likely client has passed negative coordinates of a cell.
+var ErrInvalidPoint = errors.New("invalid point")
// A View is a window. It maintains its own internal buffer and cursor
// position.
@@ -125,8 +123,7 @@ type View struct {
Tabs []string
TabIndex int
- // HighlightTabWithoutFocus allows you to show which tab is selected without the view being focused
- HighlightSelectedTabWithoutFocus bool
+
// TitleColor allow to configure the color of title and subtitle for the view.
TitleColor Attribute
@@ -838,7 +835,7 @@ func (v *View) updateSearchPositions() {
v.searcher.searchPositions = []cellPos{}
for y, line := range v.lines {
lineLoop:
- for x, _ := range line {
+ for x := range line {
if normalizeRune(line[x].chr) == rune(normalizedSearchStr[0]) {
for offset := 1; offset < len(normalizedSearchStr); offset++ {
if len(line)-1 < x+offset {
@@ -924,19 +921,29 @@ func (v *View) draw() error {
}
y := 0
+ emptyCell := cell{chr: ' ', fgColor: ColorDefault, bgColor: ColorDefault}
for _, vline := range v.viewLines[start:] {
if y >= maxY {
break
}
x := 0
- for j, c := range vline.line {
+ j := 0
+ var c cell
+ for {
if j < v.ox {
+ j++
continue
}
if x >= maxX {
break
}
+ if j > len(vline.line)-1 {
+ c = emptyCell
+ } else {
+ c = vline.line[j]
+ }
+
fgColor := c.fgColor
if fgColor == ColorDefault {
fgColor = v.FgColor
@@ -960,6 +967,7 @@ func (v *View) draw() error {
// Not sure why the previous code was here but it caused problems
// when typing wide characters in an editor
x += runewidth.RuneWidth(c.chr)
+ j++
}
y++
}
diff --git a/vendor/golang.org/x/sys/cpu/byteorder.go b/vendor/golang.org/x/sys/cpu/byteorder.go
index dcbb14ef3..271055be0 100644
--- a/vendor/golang.org/x/sys/cpu/byteorder.go
+++ b/vendor/golang.org/x/sys/cpu/byteorder.go
@@ -46,6 +46,7 @@ func hostByteOrder() byteOrder {
case "386", "amd64", "amd64p32",
"alpha",
"arm", "arm64",
+ "loong64",
"mipsle", "mips64le", "mips64p32le",
"nios2",
"ppc64le",
diff --git a/vendor/golang.org/x/sys/cpu/cpu_loong64.go b/vendor/golang.org/x/sys/cpu/cpu_loong64.go
new file mode 100644
index 000000000..0f57b05bd
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/cpu_loong64.go
@@ -0,0 +1,13 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build loong64
+// +build loong64
+
+package cpu
+
+const cacheLineSize = 64
+
+func initOptions() {
+}
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_loong64.s b/vendor/golang.org/x/sys/unix/asm_linux_loong64.s
new file mode 100644
index 000000000..6abd48eef
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/asm_linux_loong64.s
@@ -0,0 +1,54 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build linux && loong64 && gc
+// +build linux
+// +build loong64
+// +build gc
+
+#include "textflag.h"
+
+
+// Just jump to package syscall's implementation for all these functions.
+// The runtime may know about them.
+
+TEXT ·Syscall(SB),NOSPLIT,$0-56
+ JMP syscall·Syscall(SB)
+
+TEXT ·Syscall6(SB),NOSPLIT,$0-80
+ JMP syscall·Syscall6(SB)
+
+TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
+ JAL runtime·entersyscall(SB)
+ MOVV a1+8(FP), R4
+ MOVV a2+16(FP), R5
+ MOVV a3+24(FP), R6
+ MOVV R0, R7
+ MOVV R0, R8
+ MOVV R0, R9
+ MOVV trap+0(FP), R11 // syscall entry
+ SYSCALL
+ MOVV R4, r1+32(FP)
+ MOVV R5, r2+40(FP)
+ JAL runtime·exitsyscall(SB)
+ RET
+
+TEXT ·RawSyscall(SB),NOSPLIT,$0-56
+ JMP syscall·RawSyscall(SB)
+
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
+ JMP syscall·RawSyscall6(SB)
+
+TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
+ MOVV a1+8(FP), R4
+ MOVV a2+16(FP), R5
+ MOVV a3+24(FP), R6
+ MOVV R0, R7
+ MOVV R0, R8
+ MOVV R0, R9
+ MOVV trap+0(FP), R11 // syscall entry
+ SYSCALL
+ MOVV R4, r1+32(FP)
+ MOVV R5, r2+40(FP)
+ RET
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 72f65a9af..d888fb770 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -215,6 +215,7 @@ struct ltchars {
#include <linux/ethtool_netlink.h>
#include <linux/falloc.h>
#include <linux/fanotify.h>
+#include <linux/fib_rules.h>
#include <linux/filter.h>
#include <linux/fs.h>
#include <linux/fscrypt.h>
@@ -613,6 +614,7 @@ ccflags="$@"
$2 ~ /^OTP/ ||
$2 ~ /^MEM/ ||
$2 ~ /^WG/ ||
+ $2 ~ /^FIB_RULE_/ ||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
$2 ~ /^__WCOREFLAG$/ {next}
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index eeae6dbb1..d251dafae 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -1829,6 +1829,9 @@ func Dup2(oldfd, newfd int) error {
//sys Fremovexattr(fd int, attr string) (err error)
//sys Fsetxattr(fd int, attr string, dest []byte, flags int) (err error)
//sys Fsync(fd int) (err error)
+//sys Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error)
+//sys Fsopen(fsName string, flags int) (fd int, err error)
+//sys Fspick(dirfd int, pathName string, flags int) (fd int, err error)
//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
//sysnb Getpgid(pid int) (pgid int, err error)
@@ -2186,7 +2189,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
gid = Getgid()
}
- if uint32(gid) == st.Gid || isGroupMember(gid) {
+ if uint32(gid) == st.Gid || isGroupMember(int(st.Gid)) {
fmode = (st.Mode >> 3) & 7
} else {
fmode = st.Mode & 7
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go
index fd0161942..3de79fa25 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -873,6 +873,13 @@ const (
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
+ FIB_RULE_DEV_DETACHED = 0x8
+ FIB_RULE_FIND_SADDR = 0x10000
+ FIB_RULE_IIF_DETACHED = 0x8
+ FIB_RULE_INVERT = 0x2
+ FIB_RULE_OIF_DETACHED = 0x10
+ FIB_RULE_PERMANENT = 0x1
+ FIB_RULE_UNRESOLVED = 0x4
FIDEDUPERANGE = 0xc0189436
FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index 198b4ac06..bc4a27531 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -828,6 +828,49 @@ func Fsync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error) {
+ r0, _, e1 := Syscall(SYS_FSMOUNT, uintptr(fd), uintptr(flags), uintptr(mountAttrs))
+ fsfd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsopen(fsName string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsName)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_FSOPEN, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fspick(dirfd int, pathName string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(pathName)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_FSPICK, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getdents(fd int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go
index e0cdc7efe..9962d26bb 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -764,6 +764,15 @@ const (
MOVE_MOUNT_T_AUTOMOUNTS = 0x20
MOVE_MOUNT_T_EMPTY_PATH = 0x40
MOVE_MOUNT_SET_GROUP = 0x100
+
+ FSOPEN_CLOEXEC = 0x1
+
+ FSPICK_CLOEXEC = 0x1
+ FSPICK_SYMLINK_NOFOLLOW = 0x2
+ FSPICK_NO_AUTOMOUNT = 0x4
+ FSPICK_EMPTY_PATH = 0x8
+
+ FSMOUNT_CLOEXEC = 0x1
)
type OpenHow struct {
@@ -5542,3 +5551,40 @@ const (
NL80211_WPA_VERSION_2 = 0x2
NL80211_WPA_VERSION_3 = 0x4
)
+
+const (
+ FRA_UNSPEC = 0x0
+ FRA_DST = 0x1
+ FRA_SRC = 0x2
+ FRA_IIFNAME = 0x3
+ FRA_GOTO = 0x4
+ FRA_UNUSED2 = 0x5
+ FRA_PRIORITY = 0x6
+ FRA_UNUSED3 = 0x7
+ FRA_UNUSED4 = 0x8
+ FRA_UNUSED5 = 0x9
+ FRA_FWMARK = 0xa
+ FRA_FLOW = 0xb
+ FRA_TUN_ID = 0xc
+ FRA_SUPPRESS_IFGROUP = 0xd
+ FRA_SUPPRESS_PREFIXLEN = 0xe
+ FRA_TABLE = 0xf
+ FRA_FWMASK = 0x10
+ FRA_OIFNAME = 0x11
+ FRA_PAD = 0x12
+ FRA_L3MDEV = 0x13
+ FRA_UID_RANGE = 0x14
+ FRA_PROTOCOL = 0x15
+ FRA_IP_PROTO = 0x16
+ FRA_SPORT_RANGE = 0x17
+ FRA_DPORT_RANGE = 0x18
+ FR_ACT_UNSPEC = 0x0
+ FR_ACT_TO_TBL = 0x1
+ FR_ACT_GOTO = 0x2
+ FR_ACT_NOP = 0x3
+ FR_ACT_RES3 = 0x4
+ FR_ACT_RES4 = 0x5
+ FR_ACT_BLACKHOLE = 0x6
+ FR_ACT_UNREACHABLE = 0x7
+ FR_ACT_PROHIBIT = 0x8
+)
diff --git a/vendor/golang.org/x/term/term.go b/vendor/golang.org/x/term/term.go
index d59270880..1a40d1012 100644
--- a/vendor/golang.org/x/term/term.go
+++ b/vendor/golang.org/x/term/term.go
@@ -7,11 +7,11 @@
//
// Putting a terminal into raw mode is the most common requirement:
//
-// oldState, err := term.MakeRaw(int(os.Stdin.Fd()))
-// if err != nil {
-// panic(err)
-// }
-// defer term.Restore(int(os.Stdin.Fd()), oldState)
+// oldState, err := term.MakeRaw(int(os.Stdin.Fd()))
+// if err != nil {
+// panic(err)
+// }
+// defer term.Restore(int(os.Stdin.Fd()), oldState)
//
// Note that on non-Unix systems os.Stdin.Fd() may not be 0.
package term
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 2733c54d1..56d9fc240 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -169,7 +169,7 @@ github.com/jesseduffield/go-git/v5/utils/merkletrie/filesystem
github.com/jesseduffield/go-git/v5/utils/merkletrie/index
github.com/jesseduffield/go-git/v5/utils/merkletrie/internal/frame
github.com/jesseduffield/go-git/v5/utils/merkletrie/noder
-# github.com/jesseduffield/gocui v0.3.1-0.20220407213758-0c947ca079ed
+# github.com/jesseduffield/gocui v0.3.1-0.20220415000211-a826601ada29
## explicit; go 1.12
github.com/jesseduffield/gocui
# github.com/jesseduffield/minimal/gitignore v0.3.3-0.20211018110810-9cde264e6b1e
@@ -279,14 +279,14 @@ golang.org/x/exp/slices
golang.org/x/net/context
golang.org/x/net/internal/socks
golang.org/x/net/proxy
-# golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12
+# golang.org/x/sys v0.0.0-20220412211240-33da011f77ad
## explicit; go 1.17
golang.org/x/sys/cpu
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/plan9
golang.org/x/sys/unix
golang.org/x/sys/windows
-# golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
+# golang.org/x/term v0.0.0-20220411215600-e5f449aeb171
## explicit; go 1.17
golang.org/x/term
# golang.org/x/text v0.3.7