I said “FIX #31”

This commit is contained in:
Stefan Breunig 2013-03-22 19:37:35 +01:00
parent 3684e64847
commit 5a283759cc

View File

@ -26,7 +26,8 @@ window.chat.handleTabCompletion = function() {
var posStart = curPos - word.length;
var newText = text.substring(0, posStart);
newText += '@' + nick + ' ';
var atPresent = text.substring(posStart-1, posStart) === '@';
newText += (atPresent ? '' : '@') + nick + ' ';
newText += text.substring(curPos);
el.val(newText);
}