diff options
author | Alexey Yerin <yyp@disroot.org> | 2021-05-21 20:52:45 +0300 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-05-25 12:39:43 +0200 |
commit | 2b3c8d238d6ec4621509c57b8249928e6c948ef0 (patch) | |
tree | 337296c613810cb94b4c1eb1affc23ef0b6e928b /commands.go | |
parent | commands: do not handle s == "" (diff) |
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
Diffstat (limited to 'commands.go')
-rw-r--r-- | commands.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands.go b/commands.go index 797878e..009bc81 100644 --- a/commands.go +++ b/commands.go @@ -438,7 +438,7 @@ func (app *App) handleInput(buffer, content string) error { cmdName, rawArgs, isCommand := parseCommand(content) if !isCommand { - return noCommand(app, buffer, content) + return noCommand(app, buffer, rawArgs) } if cmdName == "" { return fmt.Errorf("lone slash at the begining") |