diff --git a/tools/libtxt/edit.c b/tools/libtxt/edit.c index 65e5f9f..4456bfd 100644 --- a/tools/libtxt/edit.c +++ b/tools/libtxt/edit.c @@ -181,8 +181,8 @@ struct edit *text2edit(const char *s) if (s != start) { add_string(&last, start, s-start); have_text = 1; - start = s+1; } + start = s+1; if (*s == '\n' && !have_text) continue; @@ -195,8 +195,10 @@ struct edit *text2edit(const char *s) *last = e; last = &e->next; - if (*s == '\n') + if (*s == '\n') { + have_text = 0; continue; + } end = strchr(s, '>'); if (!end)