Changeset dd6af02 for viewwin.c


Ignore:
Timestamp:
Sep 28, 2009, 12:56:20 PM (15 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
fb2f9ab
Parents:
7b4d90e
Message:
Revert 7b4d90e... and just fix #51

owl_fmtext_truncate_cols once again expects that fmtext ends in a
newline.

Revert documentation changes and remove test that now breaks while
testing out-of-spec text.

In owl_viewwin_init_fmtext, check that fmtext ends in a newline and
append one if necessary.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • viewwin.c

    r4083c49 rdd6af02  
    3535void owl_viewwin_init_fmtext(owl_viewwin *v, WINDOW *win, int winlines, int wincols, const owl_fmtext *fmtext)
    3636{
     37  char *text;
     38
    3739  owl_fmtext_copy(&(v->fmtext), fmtext);
     40  text = owl_fmtext_print_plain(fmtext);
     41  if (text[0] != '\0' && text[strlen(text) - 1] != '\n') {
     42      owl_fmtext_append_normal(&(v->fmtext), "\n");
     43  }
    3844  v->textlines=owl_fmtext_num_lines(&(v->fmtext));
    3945  v->topline=0;
Note: See TracChangeset for help on using the changeset viewer.