From c6e46fed45d803243805975ea3f2c5f73e84654f Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 27 Nov 2010 20:13:10 +0000 Subject: 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 --- test/editor.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'test') 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); -- cgit v1.2.3