Changeset d36f2cb
- Timestamp:
- Jun 29, 2002, 7:42:37 PM (23 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 8ee73f8d
- Parents:
- 7360fab
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r7360fab rd36f2cb 29 29 matching current" and "move to previous message 30 30 matching current" 31 Added variables edit:maxfillcols and edit:maxwrapcols which 32 will limit how wide editing paragraphs may get before 33 they get wrapped. Default is 70 columns each. 34 Added smartzpunt command with key binding of "C-x k". 35 This starts a zpunt command filled in with 36 the proposed zpunt. 31 37 32 38 1.2.0-pre-erikdevel-17 -
commands.c
r7360fab rd36f2cb 148 148 "getsubs retrieves the current subscriptions from the server\n" 149 149 "and displays them.\n"), 150 151 OWLCMD_ARGS("smartzpunt", owl_command_smartzpunt, OWL_CTX_INTERACTIVE, 152 "creates a zpunt based on the current message", 153 "smartnarrow [-i | --instance]", 154 "Starts a zpunt command based on the current message's class\n" 155 "(and instance if -i is specified).\n"), 150 156 151 157 OWLCMD_ARGS("zpunt", owl_command_zpunt, OWL_CTX_ANY, … … 1386 1392 } 1387 1393 1394 char *owl_command_smartzpunt(int argc, char **argv, char *buff) { 1395 if (argc == 1) { 1396 owl_function_smartzpunt(0); 1397 } else if (argc == 2 && (!strcmp(argv[1], "-i") || !strcmp(argv[1], "--instance"))) { 1398 owl_function_smartzpunt(1); 1399 } else { 1400 owl_function_makemsg("Wrong number of arguments for %s", argv[0]); 1401 } 1402 return NULL; 1403 } 1404 1405 1388 1406 1389 1407 /*********************************************************************/ -
editwin.c
r1aee7d9 rd36f2cb 21 21 e->winlines=winlines; 22 22 e->wincols=wincols; 23 if (wincols > 80) { 24 e->fillcol=80-9; 25 } else { 26 e->fillcol=wincols-9; 27 } 28 e->wrapcol=wincols-9; 23 e->fillcol=owl_editwin_limit_maxcols(wincols-1, 24 owl_global_get_edit_maxfillcols(&g)); 25 e->wrapcol=owl_editwin_limit_maxcols(wincols-1, 26 owl_global_get_edit_maxwrapcols(&g)); 29 27 e->curswin=win; 30 28 e->style=style; … … 42 40 e->winlines=winlines; 43 41 e->wincols=wincols; 44 if (wincols > 80) { 45 e->fillcol=80-8; 46 } else { 47 e->fillcol=wincols-8; 48 } 49 e->wrapcol=wincols-9; 42 e->fillcol=owl_editwin_limit_maxcols(wincols-1, 43 owl_global_get_edit_maxfillcols(&g)); 44 e->wrapcol=owl_editwin_limit_maxcols(wincols-1, 45 owl_global_get_edit_maxwrapcols(&g)); 50 46 } 51 47 … … 56 52 void owl_editwin_set_dotsend(owl_editwin *e) { 57 53 e->dotsend=1; 54 } 55 56 int owl_editwin_limit_maxcols(int v, int maxv) { 57 if (maxv > 5 && v > maxv) { 58 return maxv; 59 } else { 60 return v; 61 } 58 62 } 59 63 -
functions.c
r7360fab rd36f2cb 218 218 skip_deleted?" non-deleted":"", 219 219 filter?" in ":"", filter?filter:""); 220 owl_function_beep();220 if (!skip_deleted) owl_function_beep(); 221 221 } 222 222 … … 267 267 skip_deleted?" non-deleted":"", 268 268 filter?" in ":"", filter?filter:""); 269 owl_function_beep();269 if (!skip_deleted) owl_function_beep(); 270 270 } 271 271 … … 1843 1843 } 1844 1844 1845 void owl_function_smartzpunt(int type) { 1846 /* Starts a zpunt command based on the current class,instance pair. 1847 * If type=0, uses just class. If type=1, uses instance as well. */ 1848 owl_view *v; 1849 owl_message *m; 1850 char *cmd, *cmdprefix, *mclass, *minst; 1851 1852 v=owl_global_get_current_view(&g); 1853 m=owl_view_get_element(v, owl_global_get_curmsg(&g)); 1854 1855 if (owl_view_get_size(v)==0) { 1856 owl_function_makemsg("No message selected\n"); 1857 return; 1858 } 1859 1860 /* for now we skip admin messages. */ 1861 if (owl_message_is_admin(m) 1862 || owl_message_is_login(m) 1863 || !owl_message_is_zephyr(m)) { 1864 owl_function_makemsg("smartzpunt doesn't support this message type."); 1865 return; 1866 } 1867 1868 mclass = owl_message_get_class(m); 1869 minst = owl_message_get_instance(m); 1870 if (!mclass || !*mclass || *mclass==' ' 1871 || (!strcasecmp(mclass, "message") && !strcasecmp(minst, "personal")) 1872 || (type && (!minst || !*minst|| *minst==' '))) { 1873 owl_function_makemsg("smartzpunt can't safely do this for <%s,%s>", 1874 mclass, minst); 1875 } else { 1876 cmdprefix = "start-command zpunt "; 1877 cmd = owl_malloc(strlen(cmdprefix)+strlen(mclass)+strlen(minst)+3); 1878 strcpy(cmd, cmdprefix); 1879 strcat(cmd, mclass); 1880 if (type) { 1881 strcat(cmd, " "); 1882 strcat(cmd, minst); 1883 } else { 1884 strcat(cmd, " *"); 1885 } 1886 owl_function_command(cmd); 1887 owl_free(cmd); 1888 } 1889 } 1890 1891 1892 1845 1893 void owl_function_color_current_filter(char *color) { 1846 1894 owl_filter *f; -
keys.c
r7360fab rd36f2cb 188 188 BIND_CMD("d", "delete", "mark message for deletion"); 189 189 BIND_CMD("M-D", "delete view", "mark all messages in view for deletion"); 190 BIND_CMD("C-x k", "smartzpunt -i", "zpunt current <class,instance>"); 190 191 191 192 BIND_CMD("X", "( expunge ; view --home )", "expunge deletions and switch to home view"); -
variable.c
r1aee7d9 rd36f2cb 119 119 OWLVAR_STRING( "view_home" /* %OwlVarStub */, "all", 120 120 "home view to switch to after 'X'" ), 121 122 OWLVAR_INT( "edit:maxfillcols" /* %OwlVarStub:edit_maxfillcols */, 70, 123 "maximum number of columns for M-q to fill text to" ), 124 125 OWLVAR_INT( "edit:maxwrapcols" /* %OwlVarStub:edit_maxwrapcols */, 70, 126 "maximum number of columns for line-wrapping" ), 121 127 122 128 OWLVAR_INT_FULL( "typewinsize" /* %OwlVarStub:typwin_lines */,
Note: See TracChangeset
for help on using the changeset viewer.