Changeset 9866c3a for message.c


Ignore:
Timestamp:
Dec 27, 2007, 11:01:03 AM (16 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
925e122
Parents:
dd24b6a
Message:
Reworked the fmtext format to use in-line formatting.  Characters used
for formatting are part of Unicode Supplemental Private Area-B, or
Plane 16.

fmtext no longer need 5x the text space to store formatting
information, though they are harder to change at arbitrary
points. This was something we hardly ever did anyhow, and we can still
do everything we need to do.

fmtext keeps a pair of colors and a char for default attributes to be
applied when necessary.

Searching is now done inline at owl_fmtext_waddstr() rather than
specifying a section of the string to be reversed.

This probably still needs some cleanup and more comments, but it
works.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • message.c

    r93ee554 r9866c3a  
    537537  owl_fmtext_truncate_lines(&(m->fmtext->fmtext), aline, bline-aline+1, &a);
    538538  owl_fmtext_truncate_cols(&a, acol, bcol, &b);
    539   if (fgcolor!=OWL_COLOR_DEFAULT) {
    540     owl_fmtext_colorize(&b, fgcolor);
    541   }
    542   if (bgcolor!=OWL_COLOR_DEFAULT) {
    543     owl_fmtext_colorizebg(&b, bgcolor);
    544   }
    545 
    546   if (owl_global_is_search_active(&g)) {
    547     owl_fmtext_search_and_highlight(&b, owl_global_get_search_string(&g));
    548   }
    549      
    550   owl_fmtext_curs_waddstr(&b, win);
     539  owl_fmtext_colorize(&b, fgcolor);
     540  owl_fmtext_colorizebg(&b, bgcolor);
     541
     542  owl_fmtext_curs_waddstr(&b, win, owl_global_is_search_active(&g));
    551543
    552544  owl_fmtext_free(&a);
Note: See TracChangeset for help on using the changeset viewer.