int list_depth = 0;
int list_style = 0;
int list_num = 0;
- int remove_list_off = -1;
GtkTextIter iter2 = *iter;
GtkTextChildAnchor *anchor = NULL;
chars_per_line++;
}
- if(chars_per_line == 1) {
- // empty list element -> inserting a newline terminates the list
- list_depth = 0;
- *remove_offset = off + 1;
- }
-
if(list_depth > 0) {
- *depth = list_depth;
- *style = list_style;
- *num = list_num;
- *remove_offset = -1;
- return 1;
+ if(chars_per_line == 1) {
+ list_depth = 0;
+ *remove_offset = off + 1;
+ } else {
+ *depth = list_depth;
+ *style = list_style;
+ *num = list_num;
+ *remove_offset = -1;
+ return 1;
+ }
}
return 0;
}