Skip to content

Commit

Permalink
Strip leading spaces on command; Fix #2626 (#2627)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlaltca authored Apr 5, 2024
1 parent 3ae641a commit 993d8de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/kvirc/kernel/KviUserInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ namespace KviUserInput
if(!c->unicode())
return true; // empty

// check if it's a KVS command. Skip any initial space
while(c->isSpace()) c++;
if(c->unicode() == '\\')
{
c++;
Expand All @@ -69,6 +71,9 @@ namespace KviUserInput
}
}

// the text is not a command. Reset to original value
c = b;

if(KVS_TRIGGER_EVENT_1_HALTED(KviEvent_OnTextInput, pWindow, szData))
return true; // halted

Expand Down

0 comments on commit 993d8de

Please sign in to comment.