From 47267669ce93edc58919379e6436ad7088677a31 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Wed, 12 Jun 2013 13:21:10 +0800 Subject: [PATCH] fixed a wrong optimization when opening a new text line --- src/HTMLTextPage.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/HTMLTextPage.cc b/src/HTMLTextPage.cc index 73da126..0f23d8b 100644 --- a/src/HTMLTextPage.cc +++ b/src/HTMLTextPage.cc @@ -95,10 +95,8 @@ void HTMLTextPage::clear(void) void HTMLTextPage::open_new_line(const HTMLLineState & line_state) { - if((!text_lines.empty()) && (text_lines.back()->text_empty())) - { - text_lines.pop_back(); - } + // do not reused the last text_line even if it's empty + // because the clip states may point to the next index text_lines.emplace_back(new HTMLTextLine(line_state, param, all_manager)); cur_line = text_lines.back().get(); }