Changeset 217a43e
- Timestamp:
- Jul 3, 2002, 6:28:46 PM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 8df36cc
- Parents:
- 83a9b63
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r1c6c4d3 r217a43e 21 21 The "Not logged in or subscribing to messages" error 22 22 now includes the name of the recipient. 23 Fixed a bug in the "reply -e" command. 24 The "disable-ctrl-d" variable may also be set to "middle" 25 which will result in ctrl-d only sending at the 26 end of the message. This is now the default. 27 This also added a command "editmulti:done-or-delete". 23 28 24 29 1.2.1-pre-1 -
commands.c
r1c6c4d3 r217a43e 622 622 "", ""), 623 623 624 OWLCMD_VOID_CTX("editmulti:done-or-delete", owl_command_editmulti_done_or_delete, 625 OWL_CTX_EDITMULTI, 626 "completes the command, but only if at end of message", 627 "", 628 "If only whitespace is to the right of the cursor,\n" 629 "runs 'editmulti:done'.\n"\ 630 "Otherwise runs 'edit:delete-next-char'\n"), 631 624 632 /****************************************************************/ 625 633 /********************** POPLESS-SPECIFIC ************************/ … … 1146 1154 edit=1; 1147 1155 argv++; 1156 argc--; 1148 1157 } 1149 1158 … … 1553 1562 } 1554 1563 1564 void owl_command_editmulti_done_or_delete(owl_editwin *e) { 1565 if (owl_editwin_is_at_end(e)) { 1566 owl_command_editmulti_done(e); 1567 } else { 1568 owl_editwin_delete_char(e); 1569 } 1570 } 1571 1555 1572 1556 1573 /*********************************************************************/ -
editwin.c
rb68f9cd r217a43e 740 740 } 741 741 742 /* returns if only whitespace remains */ 743 int owl_editwin_is_at_end(owl_editwin *e) { 744 int i, cur; 745 cur=_owl_editwin_get_index_from_xy(e); 746 if (cur >= e->bufflen) return(1); 747 for (i=e->bufflen-1; i>cur; i--) { 748 if (e->buff[i] != '\r' 749 && e->buff[i] != '\n' 750 && e->buff[i] != ' ') { 751 return(0); 752 } 753 } 754 if (cur==i) return(1); 755 else return(0); 756 } 757 742 758 int owl_editwin_check_dotsend(owl_editwin *e) { 743 759 int i; -
functions.c
r507d5aa r217a43e 126 126 owl_editwin_new_style(e, OWL_EDITWIN_STYLE_MULTILINE); 127 127 128 if (!owl_global_ is_lockout_ctrld(&g)) {128 if (!owl_global_get_lockout_ctrld(&g)) { 129 129 owl_function_makemsg("Type your zephyr below. End with ^D or a dot on a line by itself. ^C will quit."); 130 130 } else { -
keys.c
r262422c r217a43e 94 94 /*BIND_CMD("C-c C-c", "editmulti:done", "sends the zephyr");*/ 95 95 96 /* note that changing "disable-ctrl-d" will change this to96 /* note that changing "disable-ctrl-d" to "on" will change this to 97 97 * edit:delete-next-char */ 98 BIND_CMD("C-d", "editmulti:done ", "sends the zephyr");98 BIND_CMD("C-d", "editmulti:done-or-delete", "sends the zephyr if at the end of the message"); 99 99 100 100 -
variable.c
r039213e r217a43e 42 42 NULL } 43 43 44 #define OWLVAR_ENUM_FULL(name,default,docstring,validset,validate, set, get) \ 45 { name, OWL_VARIABLE_INT, NULL, default, validset, docstring, NULL, \ 46 validate, \ 47 set, owl_variable_enum_set_fromstring, \ 48 get, owl_variable_enum_get_tostring, \ 49 NULL } 50 44 51 static owl_variable variables_to_init[] = { 45 52 … … 78 85 "turn class logging on or off" ), 79 86 80 OWLVAR_ BOOL_FULL( "disable-ctrl-d" /* %OwlVarStub:lockout_ctrld */, 0,81 "don't send zephyrs on C-d ",87 OWLVAR_ENUM_FULL( "disable-ctrl-d" /* %OwlVarStub:lockout_ctrld */, 1, 88 "don't send zephyrs on C-d (or disable if in the middle of the message if set to 'middle')", "off,middle,on", 82 89 NULL, owl_variable_disable_ctrl_d_set, NULL), 83 90 … … 186 193 * any user setting of this */ 187 194 int owl_variable_disable_ctrl_d_set(owl_variable *v, void *newval) { 188 if (newval && !owl_context_is_startup(owl_global_get_context(&g)) 189 && (*(int*)newval == 1 || *(int*)newval == 0)) { 190 if (*(int*)newval) { 195 if (newval && !owl_context_is_startup(owl_global_get_context(&g))) { 196 if (*(int*)newval == 2) { 191 197 owl_function_command_norv("bindkey editmulti C-d command edit:delete-next-char"); 198 } else if (*(int*)newval == 1) { 199 owl_function_command_norv("bindkey editmulti C-d command editmulti:done-or-delete"); 192 200 } else { 193 201 owl_function_command_norv("bindkey editmulti C-d command editmulti:done"); 194 202 } 195 203 } 196 return owl_variable_ bool_set_default(v, newval);204 return owl_variable_int_set_default(v, newval); 197 205 } 198 206
Note: See TracChangeset
for help on using the changeset viewer.