projects
/
ssh-chat
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9979265
)
Don't explode when autocompleting nothing.
author
Andrey Petrov
<andrey.petrov@shazow.net>
Tue, 10 Feb 2015 20:04:19 +0000
(12:04 -0800)
committer
Andrey Petrov
<andrey.petrov@shazow.net>
Tue, 10 Feb 2015 20:04:19 +0000
(12:04 -0800)
Fixes #126.
host.go
patch
|
blob
|
history
diff --git
a/host.go
b/host.go
index ddaa260f638f57d13778e6c75942fe20527d83c1..ca17f70560d64eb47bd4b5ab32c7fffc67de76c8 100644
(file)
--- a/
host.go
+++ b/
host.go
@@
-199,7
+199,7
@@
func (h *Host) AutoCompleteFunction(u *message.User) func(line string, pos int,
return
}
- if strings.HasSuffix(line[:pos], " ") {
+ if
line == "" ||
strings.HasSuffix(line[:pos], " ") {
// Don't autocomplete spaces.
return
}