Changeset 80ed757


Ignore:
Timestamp:
May 8, 2010, 10:19:56 AM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
release-1.6
Children:
161e879
Parents:
937ac795
git-author:
Nelson Elhage <nelhage@mit.edu> (05/03/10 20:56:02)
git-committer:
Nelson Elhage <nelhage@mit.edu> (05/08/10 10:19:56)
Message:
Always disable wrapping in single-line editwins.

I also backported a hunk of d625cfd839f0b56d75199e576c0d3cab29a103b2for 1.6
File:
1 edited

Legend:

Unmodified
Added
Removed
  • editwin.c

    rb96cc28 r80ed757  
    125125  e->topindex = 0;
    126126  e->excursions = NULL;
    127   owl_editwin_set_curswin(e, win, winlines, wincols);
    128127  e->style=style;
    129128  if ((style!=OWL_EDITWIN_STYLE_MULTILINE) &&
     
    131130    e->style=OWL_EDITWIN_STYLE_MULTILINE;
    132131  }
     132  owl_editwin_set_curswin(e, win, winlines, wincols);
    133133  e->lock=0;
    134134  e->dotsend=0;
     
    152152  e->wincols=wincols;
    153153  e->fillcol=owl_editwin_limit_maxcols(wincols-7, owl_global_get_edit_maxfillcols(&g));
    154   e->wrapcol=owl_editwin_limit_maxcols(wincols-7, owl_global_get_edit_maxwrapcols(&g));
     154  if (e->style == OWL_EDITWIN_STYLE_MULTILINE)
     155    e->wrapcol=owl_editwin_limit_maxcols(wincols-7, owl_global_get_edit_maxwrapcols(&g));
     156  else
     157    e->wrapcol = 0;
    155158}
    156159
     
    12321235    }
    12331236
    1234     if (e->cursorx != -1 && e->cursorx + oe_char_width(c, e->cursorx) > e->wrapcol) {
     1237    if (e->wrapcol > 0 && e->cursorx != -1 &&
     1238        e->cursorx + oe_char_width(c, e->cursorx) > e->wrapcol) {
    12351239      /* XXX this is actually wrong:
    12361240       * + If the line has been been wrapped, we can be past the wrap column but
Note: See TracChangeset for help on using the changeset viewer.