diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-11-27 20:13:10 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-11-27 20:13:10 +0000 |
| commit | c6e46fed45d803243805975ea3f2c5f73e84654f (patch) | |
| tree | 231cdd994a96979758df724db1520be69c5d337a /test | |
| parent | 39169af7dd1e6e3a518788f130304600dac6f221 (diff) | |
Preliminary implementation of Tab characters insisde Fl_Text-*. We still need to test wrapping, etc.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7895 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
| -rw-r--r-- | test/editor.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/editor.cxx b/test/editor.cxx index 6f4b15b59..49c8d10a9 100644 --- a/test/editor.cxx +++ b/test/editor.cxx @@ -304,7 +304,6 @@ void style_init(void) { char *style = new char[textbuf->length() + 1]; char *text = textbuf->text(); - memset(style, 'A', textbuf->length()); style[textbuf->length()] = '\0'; @@ -778,9 +777,21 @@ Fl_Window* new_view() { w->editor->textsize(TS); //w->editor->wrap_mode(Fl_Text_Editor::WRAP_AT_BOUNDS, 100); w->editor->buffer(textbuf); + w->editor->textfont(FL_HELVETICA); + textbuf->text( + "12345678912345678901234567890\n" + "\tqwertyuiop\n" + "WWWWWWWW\tqwertyuiop\n" + "iiiiiiii\tqwertyuiop\n" + "\tasdfghjkl\n" + "\t\tasdfghjkl\t\n" + "\t\t\tzxcvbnm,\t\t\n" + "a\tb\tc\td\te\n" + "nvfdnv"); w->editor->highlight_data(stylebuf, styletable, sizeof(styletable) / sizeof(styletable[0]), 'A', style_unfinished_cb, 0); + style_init(); w->end(); w->resizable(w->editor); w->callback((Fl_Callback *)close_cb, w); |
