) stylebuf = new Fl_Text_Buffer (textbuf-> length ()); _parse (text, style, textbuf- > length ());> text (style); [] style; (text);
}
//
// 'style_unfinished_cb ()' - Update unfinished styles.
// _unfinished_cb (int, void *) {
}
//
// 'style_update ()' - Update the style buffer.
// _update (int pos,// ​​I - Position of updatenInserted,// ​​I - Number of inserted charsnDeleted,// ​​I - Number of deleted chars/* nRestyled * /,// ​​I - Number of restyled charschar */* deletedText * /,// ​​I - Text that was deleted * cbArg) {//I - Callback data,// ​​Start of text;// End of text,// ​​Last style on line p>
* style,// ​​Style data ​​p>
* text;// Text data ​​p>
// If this is just a selection change, just unselect the style buffer. (nInserted == 0 && nDeleted == 0) {> unselect ();;
}
// Track changes in the text buffer. (nInserted> 0) {
// Insert characters into the style buffer. = new char [nInserted + 1]; (style, 'A', nInserted); [nInserted] = ' 0';> replace (pos , pos + nDeleted, style); [] style;
} else {
// Just delete characters in the style buffer.> remove (pos, pos + nDeleted);
}
// Select the area that was just updated to avoid unnecessary
// callbacks.> select (pos, pos + nInserted - nDeleted);
// Re-parse the changed region; we do this by parsing from the
// beginning of the previous line of the changed region to the end of
// the line of the changed region. Then we check the last
// style character and keep updating if we have a multi-line
// comment character. = textbuf-> line_start (pos);
// if (start> 0) start = textbuf-> line_start (start - 1); = textbuf-> line_end (pos + nInserted); = textbuf-> text_range (start , end); = stylebuf-> text_range (start, end); (start == end) = 0; = style [end - start - 1];
// printf ("start =% d, end =% d, text = "% s ", style = "% s ", last = '% c '. n ",
// start, end, text, style, last); _parse (text, style, end - start);
// printf ("new style = "% s ", new last = '% c'. n",
// style, style [end - start - 1]);> replace (start, end, style);
((Fl_Text_Editor *) cbArg) -> redisplay_range (start, end); (start == end | | last! = style [end - start - 1]) {
// printf ("Recalculate the r...