Update search prompt, fix some buggy output formatting
All checks were successful
timw4mail/gilo/pipeline/head This commit looks good
All checks were successful
timw4mail/gilo/pipeline/head This commit looks good
This commit is contained in:
parent
910107428c
commit
554012eb52
@ -145,7 +145,7 @@ func (e *editor) find() {
|
||||
lastMatch := -1
|
||||
direction := 1
|
||||
|
||||
query := e.prompt("Search: %s (ESC to cancel)", func(query string, ch string) {
|
||||
query := e.prompt("Search: %s (Use ESC/Arrows/Enter)", func(query string, ch string) {
|
||||
if ch == string(key.Enter) || ch == string(key.Esc) {
|
||||
lastMatch = -1
|
||||
direction = 1
|
||||
|
@ -18,12 +18,7 @@ func ReadKey() (rune, int) {
|
||||
}
|
||||
|
||||
// Print string to stdout
|
||||
func Write(s string, a ...interface{}) {
|
||||
fmt.Printf(s, a...)
|
||||
func Write(s string) {
|
||||
fmt.Print(s)
|
||||
}
|
||||
|
||||
func WriteLn(s string, a ...interface{}) {
|
||||
str := fmt.Sprintf(s, a...)
|
||||
|
||||
Write("%s\r\n", str)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user