Mercurial > hg
comparison mcabber/src/commands.c @ 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 | 6c9e8fb69965 |
children | 5eb701c1bc1f |
comparison
equal
deleted
inserted
replaced
795:b16acadd7d53 | 796:79c8823da808 |
---|---|
164 // Multi-line (msay) category | 164 // Multi-line (msay) category |
165 compl_add_category_word(COMPL_MULTILINE, "abort"); | 165 compl_add_category_word(COMPL_MULTILINE, "abort"); |
166 compl_add_category_word(COMPL_MULTILINE, "begin"); | 166 compl_add_category_word(COMPL_MULTILINE, "begin"); |
167 compl_add_category_word(COMPL_MULTILINE, "send"); | 167 compl_add_category_word(COMPL_MULTILINE, "send"); |
168 compl_add_category_word(COMPL_MULTILINE, "send_to"); | 168 compl_add_category_word(COMPL_MULTILINE, "send_to"); |
169 compl_add_category_word(COMPL_MULTILINE, "toggle"); | |
169 compl_add_category_word(COMPL_MULTILINE, "verbatim"); | 170 compl_add_category_word(COMPL_MULTILINE, "verbatim"); |
170 | 171 |
171 // Room category | 172 // Room category |
172 compl_add_category_word(COMPL_ROOM, "affil"); | 173 compl_add_category_word(COMPL_ROOM, "affil"); |
173 compl_add_category_word(COMPL_ROOM, "ban"); | 174 compl_add_category_word(COMPL_ROOM, "ban"); |
778 "the /msay command."); | 779 "the /msay command."); |
779 scr_LogPrint(LPRINT_NORMAL, "(Use \"/msay begin\" to enter " | 780 scr_LogPrint(LPRINT_NORMAL, "(Use \"/msay begin\" to enter " |
780 "multi-line mode...)"); | 781 "multi-line mode...)"); |
781 free_arg_lst(paramlst); | 782 free_arg_lst(paramlst); |
782 return; | 783 return; |
784 } | |
785 | |
786 if (!strcasecmp(subcmd, "toggle")) { | |
787 if (scr_get_multimode()) | |
788 subcmd = "send"; | |
789 else | |
790 subcmd = "begin"; | |
783 } | 791 } |
784 | 792 |
785 if (!strcasecmp(subcmd, "abort")) { | 793 if (!strcasecmp(subcmd, "abort")) { |
786 if (scr_get_multimode()) | 794 if (scr_get_multimode()) |
787 scr_LogPrint(LPRINT_NORMAL, "Leaving multi-line message mode."); | 795 scr_LogPrint(LPRINT_NORMAL, "Leaving multi-line message mode."); |