preserve mark order in f[sx] variables (#59)

* preserve mark order in f[sx] variables

* Revert "preserve mark order in f[sx] variables"

This reverts commit e02c5e8bb3.

* preserve mark order in f[sx], but more efficiently
credit to @gokcehan for the idea
This commit is contained in:
Olivier Perret authored and gokcehan committed 2017-01-06 00:23:22 +03:00
1 parent 79ca4cfe9d
commit a704248696
3 files changed
+51 -27

No files matched your search

+2 -2
View File
@@ -209,7 +209,7 @@ func (win *win) printl(x, y int, fg, bg termbox.Attribute, s string) {
win.printf(x, y, fg, bg, "%s%*s", s, win.w-len(s), "")
}
func (win *win) printd(dir *dir, marks, saves map[string]bool) {
func (win *win) printd(dir *dir, marks map[string]int, saves map[string]bool) {
if win.w < 3 {
return
}
@@ -254,7 +254,7 @@ func (win *win) printd(dir *dir, marks, saves map[string]bool) {
path := filepath.Join(dir.path, f.Name())
if marks[path] {
if _, ok := marks[path]; ok {
win.print(0, i, fg, termbox.ColorMagenta, " ")
} else if copy, ok := saves[path]; ok {
if copy {