Compare commits
5 Commits
addb6e243e
...
516185b5e8
Author | SHA1 | Date | |
---|---|---|---|
|
516185b5e8 | ||
|
503a659983 | ||
|
aee5c3371f | ||
|
36a7a18316 | ||
|
2104a501aa |
1
eval.go
1
eval.go
@ -1916,6 +1916,7 @@ func (e *callExpr) eval(app *app, args []string) {
|
||||
update(app)
|
||||
case "cmd-delete-back":
|
||||
if len(app.ui.cmdAccLeft) == 0 {
|
||||
normal(app)
|
||||
return
|
||||
}
|
||||
app.ui.cmdAccLeft = app.ui.cmdAccLeft[:len(app.ui.cmdAccLeft)-1]
|
||||
|
2
makefile
Normal file
2
makefile
Normal file
@ -0,0 +1,2 @@
|
||||
install:
|
||||
env CGO_ENABLED=0 go install --ldflags="-s -w"
|
9
nav.go
9
nav.go
@ -1667,9 +1667,12 @@ func (nav *nav) readTags() error {
|
||||
|
||||
scanner := bufio.NewScanner(f)
|
||||
for scanner.Scan() {
|
||||
toks := strings.SplitN(scanner.Text(), ":", 2)
|
||||
if _, ok := nav.tags[toks[0]]; !ok {
|
||||
nav.tags[toks[0]] = toks[1]
|
||||
text := scanner.Text()
|
||||
ind := strings.LastIndex(text, ":")
|
||||
path := text[0:ind]
|
||||
mark := text[ind+1:]
|
||||
if _, ok := nav.tags[path]; !ok {
|
||||
nav.tags[path] = mark
|
||||
}
|
||||
}
|
||||
|
||||
|
7
os.go
7
os.go
@ -11,6 +11,7 @@ import (
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
@ -177,7 +178,7 @@ func isHidden(f os.FileInfo, path string, hiddenfiles []string) bool {
|
||||
}
|
||||
|
||||
func userName(f os.FileInfo) string {
|
||||
if stat, ok := f.Sys().(*unix.Stat_t); ok {
|
||||
if stat, ok := f.Sys().(*syscall.Stat_t); ok {
|
||||
if u, err := user.LookupId(fmt.Sprint(stat.Uid)); err == nil {
|
||||
return fmt.Sprintf("%v ", u.Username)
|
||||
}
|
||||
@ -186,7 +187,7 @@ func userName(f os.FileInfo) string {
|
||||
}
|
||||
|
||||
func groupName(f os.FileInfo) string {
|
||||
if stat, ok := f.Sys().(*unix.Stat_t); ok {
|
||||
if stat, ok := f.Sys().(*syscall.Stat_t); ok {
|
||||
if g, err := user.LookupGroupId(fmt.Sprint(stat.Gid)); err == nil {
|
||||
return fmt.Sprintf("%v ", g.Name)
|
||||
}
|
||||
@ -195,7 +196,7 @@ func groupName(f os.FileInfo) string {
|
||||
}
|
||||
|
||||
func linkCount(f os.FileInfo) string {
|
||||
if stat, ok := f.Sys().(*unix.Stat_t); ok {
|
||||
if stat, ok := f.Sys().(*syscall.Stat_t); ok {
|
||||
return fmt.Sprintf("%v ", stat.Nlink)
|
||||
}
|
||||
return ""
|
||||
|
4
ui.go
4
ui.go
@ -261,7 +261,7 @@ func (win *win) printReg(screen tcell.Screen, reg *reg) {
|
||||
|
||||
if reg.loading {
|
||||
st = st.Reverse(true)
|
||||
win.print(screen, 2, 0, st, "loading...")
|
||||
// win.print(screen, 2, 0, st, "loading...")
|
||||
return
|
||||
}
|
||||
|
||||
@ -335,7 +335,7 @@ func (win *win) printDir(screen tcell.Screen, dir *dir, selections map[string]in
|
||||
}
|
||||
|
||||
if dir.loading && len(dir.files) == 0 {
|
||||
win.print(screen, 2, 0, tcell.StyleDefault.Reverse(true), "loading...")
|
||||
// win.print(screen, 2, 0, tcell.StyleDefault.Reverse(true), "loading...")
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user