From: Jean-Marc Lasgouttes Date: Mon, 6 May 2013 10:15:27 +0000 (+0200) Subject: Fix bug 6055: change-next does not work in tables X-Git-Tag: 2.1.0beta1~296 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=68202fdf44bb37ed61b69f5cab716e088c544752;p=lyx.git Fix bug 6055: change-next does not work in tables The problem was just the faulty use of CursorSlice::at_begin/end(), which does not look for end of cell, but end of inset. --- diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 308074c3a9..9b4ea3f1bb 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -456,13 +456,13 @@ bool findChange(BufferView * bv, bool next) Change orig_change = tip.paragraph().lookupChange(tip.pos()); if (next) { - for (; !tip.at_end(); tip.forwardPos()) { + for (; tip.pit() < tip.lastpit() || tip.pos() < tip.lastpos(); tip.forwardPos()) { Change change = tip.paragraph().lookupChange(tip.pos()); if (!change.isSimilarTo(orig_change)) break; } } else { - for (; !tip.at_begin();) { + for (; tip.pit() > 0 || tip.pos() > 0;) { tip.backwardPos(); Change change = tip.paragraph().lookupChange(tip.pos()); if (!change.isSimilarTo(orig_change)) {