Skip to content

Commit

Permalink
Uninitialised StyleBuffer.
Browse files Browse the repository at this point in the history
    https://github.com/jamescoxon/dl-fldigi/issues/22
     Invalid data breaking fl_height() and fl_width()
  • Loading branch information
hexameron committed May 17, 2015
1 parent 681c3e3 commit 8d64fe8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/widgets/FTextView.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ FTextBase::FTextBase(int x, int y, int w, int h, const char *l)
sbuf = new Fl_Text_Buffer_mod;

buffer(tbuf);
reset_styles(SET_FONT | SET_SIZE | SET_COLOR);
highlight_data(sbuf, styles, NATTR, FTEXT_DEF, 0, 0);
cursor_style(Fl_Text_Editor_mod::NORMAL_CURSOR);

Expand All @@ -84,8 +85,6 @@ FTextBase::FTextBase(int x, int y, int w, int h, const char *l)

// Do we want narrower scrollbars? The default width is 16.
// scrollbar_width((int)floor(scrollbar_width() * 3.0/4.0));

reset_styles(SET_FONT | SET_SIZE | SET_COLOR);
}

void FTextBase::clear()
Expand Down

0 comments on commit 8d64fe8

Please sign in to comment.