summaryrefslogtreecommitdiff
path: root/commands.go
diff options
context:
space:
mode:
authorAlexey Yerin <yyp@disroot.org>2021-05-21 20:52:45 +0300
committerHubert Hirtz <hubert@hirtz.pm>2021-05-25 12:39:43 +0200
commit2b3c8d238d6ec4621509c57b8249928e6c948ef0 (patch)
tree337296c613810cb94b4c1eb1affc23ef0b6e928b /commands.go
parentcommands: 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.go2
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")