]> git.lyx.org Git - features.git/commitdiff
enable Goto error (bug 1760)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 11 Jan 2005 13:22:42 +0000 (13:22 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 11 Jan 2005 13:22:42 +0000 (13:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9464 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlErrorList.C

index f0eec8a4da0887ce484a2a98c9fcc18ae088eed8..5cb1b8f71acf282961d8bdd21df872a0b60ce381 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-10  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * ControlErrorList.C (goTo): fix the commented-out code (bug
+       1760).
+
 2005-01-10  Angus Leeming  <leeming@lyx.org>
 
        * ControlAboutlyx.C:
index 2542f2bc8b96be4a9d44d7f857f38e4a08f2c827..28a7d07dff2a48d3a2e9b6ba7d0ac98082ad2cb2 100644 (file)
@@ -69,17 +69,14 @@ void ControlErrorList::goTo(int item)
        }
 
        // Now make the selection.
-#ifdef WITH_WARNINGS
-#warning FIXME (goto error)
-#warning This should be implemented using an LFUN. (Angus)
-#endif
-#if 0
+       // This should be implemented using an LFUN. (Angus)
        pos_type const end = std::min(err.pos_end, pit->size());
        pos_type const start = std::min(err.pos_start, end);
        pos_type const range = end - start;
-       PosIterator const pos(pit, start);
-       kernel().bufferview()->putSelectionAt(pos, range, false);
-#endif
+       DocIterator const dit = makeDocIterator(pit, start);
+       kernel().bufferview()->putSelectionAt(dit, range, false);
+       // If we used an LFUN, we would not need that
+       kernel().bufferview()->update();
 }
 
 } // namespace frontend