]> git.lyx.org Git - features.git/commitdiff
fix change lookup when cursor depth is greater than 1
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 8 Sep 2005 12:06:49 +0000 (12:06 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 8 Sep 2005 12:06:49 +0000 (12:06 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10427 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/lyxfunc.C

index 4406b8167f719f1fe5514a68310eee74b21a2427..bb3e7c26243525f46def4c7ff7be1b61375bc909 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-08  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * lyxfunc.C (lookupChange): fix code when cursor depth is greater
+       than 2.
+
 2005-09-08  Angus Leeming  <leeming@lyx.org>
 
        * ispell.C:
index 3edf1984304f46154160bf91f881ea3085a61d7b..0964eba16541267a52d1e5f22a66d5659d4d8dc6 100644 (file)
@@ -182,7 +182,7 @@ bool getStatus(LCursor cursor,
  */
 Change::Type lookupChange(DocIterator const & dit, bool outer = false)
 {
-       size_t const depth = dit.depth() - outer ? 1 : 0;
+       size_t const depth = dit.depth() - (outer ? 1 : 0);
 
        for (size_t i = 0 ; i < depth ; ++i) {
                CursorSlice const & slice = dit[i];