summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-04-16 20:51:50 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-04-16 20:51:50 +0200
commit0c96563545a1ea8ec484af0a1bfea84b57c0889b (patch)
tree0a1110df087d1377d5ace02aae773aff5690ee86
parentc421532e6e984776ad798d5b8216629e7c73c203 (diff)
downloadxK-0c96563545a1ea8ec484af0a1bfea84b57c0889b.tar.gz
xK-0c96563545a1ea8ec484af0a1bfea84b57c0889b.tar.xz
xK-0c96563545a1ea8ec484af0a1bfea84b57c0889b.zip
degesch: fix quoting a slash
-rw-r--r--degesch.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/degesch.c b/degesch.c
index ede96a8..db07059 100644
--- a/degesch.c
+++ b/degesch.c
@@ -1634,10 +1634,12 @@ process_input (struct app_context *ctx, char *user_input)
if (!(input = iconv_xstrdup (ctx->term_to_utf8, user_input, -1, &len)))
print_error ("character conversion failed for `%s'", "user input");
- else if (input[0] == '/' && input[1] != '/')
- process_user_command (ctx, input + 1);
- else
+ else if (input[0] != '/')
send_message_to_current_buffer (ctx, input);
+ else if (input[1] == '/')
+ send_message_to_current_buffer (ctx, input + 1);
+ else
+ process_user_command (ctx, input + 1);
free (input);
}