Patch #3111 2010-12-30 20:08

codeman

JumpTracker no longer wraps around at the end of jump list.
Download
3111-JumpTracker_no.patch (1.3 KB)
Category
Application::Refinement
Status
Accepted
Close date
2011-12-13 14:25
Assigned to
 
Index: debian/changelog
===================================================================
--- debian/changelog    (revision 6906)
+++ debian/changelog    (working copy)
@@ -1,4 +1,4 @@
-codeblocks (10.05svn6787) unstable; urgency=low
+codeblocks (10.05svn6906) unstable; urgency=low
 
   * New svn revision
 
Index: src/plugins/contrib/BrowseTracker/JumpTracker.cpp
===================================================================
--- src/plugins/contrib/BrowseTracker/JumpTracker.cpp    (revision 6906)
+++ src/plugins/contrib/BrowseTracker/JumpTracker.cpp    (working copy)
@@ -454,9 +454,11 @@
         if ( count > 1 )
             m_Cursor -= 1;
         if (m_Cursor < 0)
-            m_Cursor = maxJumpEntries-1;
+            //m_Cursor = maxJumpEntries-1;
+            m_Cursor = 0;
         if (m_Cursor > (int)count-1)
-            m_Cursor = count-1;
+            //m_Cursor = count-1;
+            m_Cursor = (int)count-1;
 
         EditorManager* edmgr = Manager::Get()->GetEditorManager();
         int cursor = m_Cursor;
@@ -517,8 +519,9 @@
 
         if ( count > 1 )
             m_Cursor += 1;
-        if (m_Cursor > (int)count-1)
-            m_Cursor = 0;
+        if (m_Cursor > (int)count-1)
+            m_Cursor = (int)count-1;
+            //m_Cursor = 0;
 
         EditorManager* edmgr = Manager::Get()->GetEditorManager();
         int cursor = m_Cursor;
pecan 2011-12-13 14:25

Applied 2011/12/13