Changeset d36f2cb for editwin.c


Ignore:
Timestamp:
Jun 29, 2002, 7:42:37 PM (22 years ago)
Author:
Erik Nygren <nygren@mit.edu>
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
Message:
	Added variables edit:maxfillcols and edit:maxwrapcols which
	        will limit how wide editing paragraphs may get before
		they get wrapped.  Default is 70 columns each.
	Added smartzpunt command with key binding of "C-x k".
	        This starts a zpunt command filled in with
		the proposed zpunt.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • editwin.c

    r1aee7d9 rd36f2cb  
    2121  e->winlines=winlines;
    2222  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));
    2927  e->curswin=win;
    3028  e->style=style;
     
    4240  e->winlines=winlines;
    4341  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));
    5046}
    5147
     
    5652void owl_editwin_set_dotsend(owl_editwin *e) {
    5753  e->dotsend=1;
     54}
     55
     56int owl_editwin_limit_maxcols(int v, int maxv) {
     57  if (maxv > 5 && v > maxv) {
     58    return maxv;
     59  } else {
     60    return v;
     61  }
    5862}
    5963
Note: See TracChangeset for help on using the changeset viewer.