]> granicus.if.org Git - vim/commitdiff
patch 8.2.2407: old jumplist code is never used v8.2.2407
authorBram Moolenaar <Bram@vim.org>
Mon, 25 Jan 2021 17:44:57 +0000 (18:44 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 25 Jan 2021 17:44:57 +0000 (18:44 +0100)
Problem:    Old jumplist code is never used.
Solution:   Delete the dead code. (Yegappan Lakshmanan, closes #7740)

src/mark.c
src/version.c

index 5efda8e0eb4b3e9a2ce5748ebde547132f5e2da9..6107c9ac4ee9732ddae218cda05f90f2490e8119 100644 (file)
@@ -140,9 +140,6 @@ setpcmark(void)
     int                i;
     xfmark_T   *fm;
 #endif
-#ifdef JUMPLIST_ROTATE
-    xfmark_T   tempmark;
-#endif
 
     // for :global the mark is set only once
     if (global_busy || listcmd_busy || (cmdmod.cmod_flags & CMOD_KEEPJUMPS))
@@ -152,24 +149,6 @@ setpcmark(void)
     curwin->w_pcmark = curwin->w_cursor;
 
 #ifdef FEAT_JUMPLIST
-# ifdef JUMPLIST_ROTATE
-    /*
-     * If last used entry is not at the top, put it at the top by rotating
-     * the stack until it is (the newer entries will be at the bottom).
-     * Keep one entry (the last used one) at the top.
-     */
-    if (curwin->w_jumplistidx < curwin->w_jumplistlen)
-       ++curwin->w_jumplistidx;
-    while (curwin->w_jumplistidx < curwin->w_jumplistlen)
-    {
-       tempmark = curwin->w_jumplist[curwin->w_jumplistlen - 1];
-       for (i = curwin->w_jumplistlen - 1; i > 0; --i)
-           curwin->w_jumplist[i] = curwin->w_jumplist[i - 1];
-       curwin->w_jumplist[0] = tempmark;
-       ++curwin->w_jumplistidx;
-    }
-# endif
-
     // If jumplist is full: remove oldest entry
     if (++curwin->w_jumplistlen > JUMPLISTSIZE)
     {
index 5153086b021cbbcb27b1e95ac7a3aa748fedaa93..0602b9d8761a2b3659c93ef09c366c4837e5874a 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2407,
 /**/
     2406,
 /**/