Swallow space after caret if needed (middle completion)

This commit is contained in:
Philippe Proulx 2013-10-26 19:07:04 -04:00
parent a918923852
commit 0da6014711

View file

@ -160,6 +160,10 @@ var IrcUtils = {
return ret;
}
beforeCaret = m[1] + newNick + ' ';
if (afterCaret[0] == ' ') {
// swallow first space after caret if any
afterCaret = afterCaret.substring(1);
}
return {
text: beforeCaret + afterCaret,
caretPos: beforeCaret.length,