# HG changeset patch # User Mikael Berthe # Date 1165352457 -3600 # Node ID 07941d7feee92e331672ccb982a2db04fb41e69f # Parent c0e1739a4c939e8599f0f39d09e54a5310f306f8 Ctrl-d sends a multi-line message diff -r c0e1739a4c93 -r 07941d7feee9 mcabber/doc/mcabber.1.txt --- a/mcabber/doc/mcabber.1.txt Tue Dec 05 20:21:09 2006 +0100 +++ b/mcabber/doc/mcabber.1.txt Tue Dec 05 22:00:57 2006 +0100 @@ -95,7 +95,9 @@ Up/Down:: Move in the input line history PgUp/PgDown:: Move inside the roster (buddylist) Tab:: Complete current word, in the input line -Ctrl-g:: Cancel completion / ctrl-g +Ctrl-g:: Cancel completion +Ctrl-c:: Abort multi-line messages and completions +Ctrl-d:: Send/terminate a multi-line message Ctrl-p/Ctrl-n:: Scroll up/down half a screen in the buffer window (chat mode) Ctrl-Left:: Move the cursor back to the start of the current or previous word Ctrl-Right:: Move the cursor forward to the end of the current or next word @@ -277,7 +279,7 @@ In multi-line mode, each line (except command lines) typed in the input line will be added to the multi-line message. Once the message is finished, it can be sent to the current selected buddy with the "/msay - send" command. + + send" command (or Ctrl-d). + The 'begin' subcommand enables multi-line mode. Note that it allows a message subject to be specified. + The 'verbatim' multi-line mode disables commands, so that it is diff -r c0e1739a4c93 -r 07941d7feee9 mcabber/src/screen.c --- a/mcabber/src/screen.c Tue Dec 05 20:21:09 2006 +0100 +++ b/mcabber/src/screen.c Tue Dec 05 22:00:57 2006 +0100 @@ -2414,6 +2414,13 @@ refresh_inputline(); } +static void scr_handle_CtrlD(void) +{ + // Validate current multi-line + if (scr_get_multimode()) + process_command(mkcmdstr("msay send")); +} + static void add_keyseq(char *seqstr, guint mkeycode, gint value) { keyseq *ks; @@ -2760,6 +2767,9 @@ case 3: // Ctrl-C scr_handle_CtrlC(); break; + case 4: // Ctrl-D + scr_handle_CtrlD(); + break; case KEY_END: case 5: for (; *ptr_inputline; ptr_inputline++) ;