mirror of
https://github.com/Jguer/yay.git
synced 2024-11-06 09:07:21 +01:00
Merge branch 'master' into fix#62
This commit is contained in:
commit
a3df41368b
16
cmd.go
16
cmd.go
@ -482,11 +482,11 @@ func numberMenu(pkgS []string, flags []string) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if config.SortMode == BottomUp {
|
if config.SortMode == BottomUp {
|
||||||
aq.printSearch(numpq)
|
aq.printSearch(numpq + 1)
|
||||||
pq.printSearch()
|
pq.printSearch()
|
||||||
} else {
|
} else {
|
||||||
pq.printSearch()
|
pq.printSearch()
|
||||||
aq.printSearch(numpq)
|
aq.printSearch(numpq + 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("\x1b[32m%s\x1b[0m\nNumbers: ", "Type numbers to install. Separate each number with a space.")
|
fmt.Printf("\x1b[32m%s\x1b[0m\nNumbers: ", "Type numbers to install. Separate each number with a space.")
|
||||||
@ -508,19 +508,19 @@ func numberMenu(pkgS []string, flags []string) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Install package
|
// Install package
|
||||||
if num > numaq+numpq-1 || num < 0 {
|
if num > numaq+numpq || num <= 0 {
|
||||||
continue
|
continue
|
||||||
} else if num > numpq-1 {
|
} else if num > numpq {
|
||||||
if config.SortMode == BottomUp {
|
if config.SortMode == BottomUp {
|
||||||
aurI = append(aurI, aq[numaq+numpq-num-1].Name)
|
aurI = append(aurI, aq[numaq+numpq-num].Name)
|
||||||
} else {
|
} else {
|
||||||
aurI = append(aurI, aq[num-numpq].Name)
|
aurI = append(aurI, aq[num-numpq-1].Name)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if config.SortMode == BottomUp {
|
if config.SortMode == BottomUp {
|
||||||
repoI = append(repoI, pq[numpq-num-1].Name())
|
repoI = append(repoI, pq[numpq-num].Name())
|
||||||
} else {
|
} else {
|
||||||
repoI = append(repoI, pq[num].Name())
|
repoI = append(repoI, pq[num-1].Name())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
print.go
4
print.go
@ -58,9 +58,9 @@ func (s repoQuery) printSearch() {
|
|||||||
var toprint string
|
var toprint string
|
||||||
if config.SearchMode == NumberMenu {
|
if config.SearchMode == NumberMenu {
|
||||||
if config.SortMode == BottomUp {
|
if config.SortMode == BottomUp {
|
||||||
toprint += fmt.Sprintf("\x1b[33m%d\x1b[0m ", len(s)-i-1)
|
toprint += fmt.Sprintf("\x1b[33m%d\x1b[0m ", len(s)-i)
|
||||||
} else {
|
} else {
|
||||||
toprint += fmt.Sprintf("\x1b[33m%d\x1b[0m ", i)
|
toprint += fmt.Sprintf("\x1b[33m%d\x1b[0m ", i+1)
|
||||||
}
|
}
|
||||||
} else if config.SearchMode == Minimal {
|
} else if config.SearchMode == Minimal {
|
||||||
fmt.Println(res.Name())
|
fmt.Println(res.Name())
|
||||||
|
4
query.go
4
query.go
@ -141,11 +141,11 @@ func syncSearch(pkgS []string) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if config.SortMode == BottomUp {
|
if config.SortMode == BottomUp {
|
||||||
aq.printSearch(0)
|
aq.printSearch(1)
|
||||||
pq.printSearch()
|
pq.printSearch()
|
||||||
} else {
|
} else {
|
||||||
pq.printSearch()
|
pq.printSearch()
|
||||||
aq.printSearch(0)
|
aq.printSearch(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user