aboutsummaryrefslogtreecommitdiff
path: root/ui/room-view.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/room-view.go')
-rw-r--r--ui/room-view.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/room-view.go b/ui/room-view.go
index a66b0ee..bfcb547 100644
--- a/ui/room-view.go
+++ b/ui/room-view.go
@@ -241,7 +241,7 @@ type completion struct {
id string
}
-func (view *RoomView) AutocompleteUser(existingText string) (completions []completion) {
+func (view *RoomView) autocompleteUser(existingText string) (completions []completion) {
textWithoutPrefix := strings.TrimPrefix(existingText, "@")
for _, user := range view.Room.GetMembers() {
if user.DisplayName == textWithoutPrefix || user.UserID == existingText {
@@ -256,7 +256,7 @@ func (view *RoomView) AutocompleteUser(existingText string) (completions []compl
return
}
-func (view *RoomView) AutocompleteRoom(existingText string) (completions []completion) {
+func (view *RoomView) autocompleteRoom(existingText string) (completions []completion) {
// TODO - This was harder than I expected.
return []completion{}
@@ -270,8 +270,8 @@ func (view *RoomView) InputTabComplete(text string, cursorOffset int) {
var strCompletions []string
var strCompletion string
- completions := view.AutocompleteUser(word)
- completions = append(completions, view.AutocompleteRoom(word)...)
+ completions := view.autocompleteUser(word)
+ completions = append(completions, view.autocompleteRoom(word)...)
if len(completions) == 1 {
completion := completions[0]