commit 2b3c8d2

Alexey Yerin  ·  2021-05-21 17:52:45 +0000 UTC
parent f07a0af
commands: use rawArgs on non-command

This way, the first slash when doing //-message is not deleted because
parseMessage writes the result to rawArgs, instead of the editor
content.

Fixes #63
1 files changed,  +1, -1
+1, -1
1@@ -438,7 +438,7 @@ func (app *App) handleInput(buffer, content string) error {
2 
3 	cmdName, rawArgs, isCommand := parseCommand(content)
4 	if !isCommand {
5-		return noCommand(app, buffer, content)
6+		return noCommand(app, buffer, rawArgs)
7 	}
8 	if cmdName == "" {
9 		return fmt.Errorf("lone slash at the begining")