From 7569903af6681a8afba6b162e4fd4a48890d99db Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Thu, 10 Feb 2011 21:28:43 +0000 Subject: [PATCH] For some reason, when a latex error occurs, it may happen that err.pos_start > err.pos_end such that range == 0 and nothing gets highlighted, even if the paragraph id is correct. In this case, it is better to highlight everything. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37586 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiErrorList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiErrorList.cpp b/src/frontends/qt4/GuiErrorList.cpp index 900fe86018..c9edfc258d 100644 --- a/src/frontends/qt4/GuiErrorList.cpp +++ b/src/frontends/qt4/GuiErrorList.cpp @@ -177,7 +177,7 @@ bool GuiErrorList::goTo(int item) pos_type const s = dit.paragraph().size(); pos_type const end = err.pos_end ? min(err.pos_end, s) : s; pos_type const start = min(err.pos_start, end); - pos_type const range = end - start; + pos_type const range = end == start ? s - start : end - start; dit.pos() = start; BufferView * bv = const_cast(bufferview()); // FIXME LFUN -- 2.39.2