Mercurial > hg
changeset 796:79c8823da808
Add "/msay toggle" command
Toggles multi-line mode (msay begin/msay send), meant to be used for key
bindings.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 09 Apr 2006 09:43:14 +0200 |
parents | b16acadd7d53 |
children | 5eb701c1bc1f |
files | mcabber/src/commands.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/commands.c Sun Apr 09 09:22:40 2006 +0200 +++ b/mcabber/src/commands.c Sun Apr 09 09:43:14 2006 +0200 @@ -166,6 +166,7 @@ compl_add_category_word(COMPL_MULTILINE, "begin"); compl_add_category_word(COMPL_MULTILINE, "send"); compl_add_category_word(COMPL_MULTILINE, "send_to"); + compl_add_category_word(COMPL_MULTILINE, "toggle"); compl_add_category_word(COMPL_MULTILINE, "verbatim"); // Room category @@ -782,6 +783,13 @@ return; } + if (!strcasecmp(subcmd, "toggle")) { + if (scr_get_multimode()) + subcmd = "send"; + else + subcmd = "begin"; + } + if (!strcasecmp(subcmd, "abort")) { if (scr_get_multimode()) scr_LogPrint(LPRINT_NORMAL, "Leaving multi-line message mode.");