From e7ec6166fa4b70d0d0e15056d00a90665343548f Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 16 Mar 2016 23:11:07 +0000 Subject: [PATCH] allow tab-complete to start from a blank text-input. this lets us autocomplete based on the most recently active users in a room, even if we can't spell the first char of their name. it does break tab-complete for accessibility, but that was broken anyway. --- src/TabComplete.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TabComplete.js b/src/TabComplete.js index 8886e21af9..3005411e13 100644 --- a/src/TabComplete.js +++ b/src/TabComplete.js @@ -24,10 +24,10 @@ const KEY_WINDOWS = 91; // // Capturing group containing the start // of line or a whitespace char -// \_______________ __________Capturing group of 1 or more non-whitespace chars +// \_______________ __________Capturing group of 0 or more non-whitespace chars // _|__ _|_ followed by the end of line // / \/ \ -const MATCH_REGEX = /(^|\s)(\S+)$/; +const MATCH_REGEX = /(^|\s)(\S*)$/; class TabComplete {