feat: only when math if hit enter result gets placed on the search bar
This commit is contained in:
parent
6506df75b4
commit
4608099a56
2
app.go
2
app.go
@ -214,7 +214,7 @@ func updateRemeberPath(a *App, value string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = os.WriteFile(remeberPath, []byte(strings.Join(nlist, "\n")), 0644)
|
err = os.WriteFile(remeberPath, []byte(strings.Join(nlist, "\n")+"\n"), 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
return
|
return
|
||||||
|
@ -77,6 +77,10 @@
|
|||||||
}
|
}
|
||||||
selectedI = Math.max(selectedI - 1, 0);
|
selectedI = Math.max(selectedI - 1, 0);
|
||||||
} else if (e.key === "Enter") {
|
} else if (e.key === "Enter") {
|
||||||
|
if (remeberSearch.length === 0 && search.length === 0 && mathRes) {
|
||||||
|
searchText = mathRes;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (selectedI < remeberSearch.length) {
|
if (selectedI < remeberSearch.length) {
|
||||||
EnterDir(remeberSearch[selectedI]);
|
EnterDir(remeberSearch[selectedI]);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user