commands now also work with newline after them
This commit is contained in:
parent
e7f20eeae0
commit
ff2e7bb989
@ -204,6 +204,8 @@ InputBar::send()
|
|||||||
|
|
||||||
if (text().startsWith('/')) {
|
if (text().startsWith('/')) {
|
||||||
int command_end = text().indexOf(' ');
|
int command_end = text().indexOf(' ');
|
||||||
|
if (command_end == -1)
|
||||||
|
command_end = text().indexOf('\n');
|
||||||
if (command_end == -1)
|
if (command_end == -1)
|
||||||
command_end = text().size();
|
command_end = text().size();
|
||||||
auto name = text().mid(1, command_end - 1);
|
auto name = text().mid(1, command_end - 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user