Mercurial > vim
comparison src/mark.c @ 23731:e949ad96ad7a v8.2.2407
patch 8.2.2407: old jumplist code is never used
Commit: https://github.com/vim/vim/commit/ab55f11d9bc776d546794748bc62ac47d5340c2e
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 25 18:44:57 2021 +0100
patch 8.2.2407: old jumplist code is never used
Problem: Old jumplist code is never used.
Solution: Delete the dead code. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/7740)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 25 Jan 2021 19:00:05 +0100 |
parents | e82579016863 |
children | 8f2262c72178 |
comparison
equal
deleted
inserted
replaced
23730:ab57cc57e749 | 23731:e949ad96ad7a |
---|---|
138 { | 138 { |
139 #ifdef FEAT_JUMPLIST | 139 #ifdef FEAT_JUMPLIST |
140 int i; | 140 int i; |
141 xfmark_T *fm; | 141 xfmark_T *fm; |
142 #endif | 142 #endif |
143 #ifdef JUMPLIST_ROTATE | |
144 xfmark_T tempmark; | |
145 #endif | |
146 | 143 |
147 // for :global the mark is set only once | 144 // for :global the mark is set only once |
148 if (global_busy || listcmd_busy || (cmdmod.cmod_flags & CMOD_KEEPJUMPS)) | 145 if (global_busy || listcmd_busy || (cmdmod.cmod_flags & CMOD_KEEPJUMPS)) |
149 return; | 146 return; |
150 | 147 |
151 curwin->w_prev_pcmark = curwin->w_pcmark; | 148 curwin->w_prev_pcmark = curwin->w_pcmark; |
152 curwin->w_pcmark = curwin->w_cursor; | 149 curwin->w_pcmark = curwin->w_cursor; |
153 | 150 |
154 #ifdef FEAT_JUMPLIST | 151 #ifdef FEAT_JUMPLIST |
155 # ifdef JUMPLIST_ROTATE | |
156 /* | |
157 * If last used entry is not at the top, put it at the top by rotating | |
158 * the stack until it is (the newer entries will be at the bottom). | |
159 * Keep one entry (the last used one) at the top. | |
160 */ | |
161 if (curwin->w_jumplistidx < curwin->w_jumplistlen) | |
162 ++curwin->w_jumplistidx; | |
163 while (curwin->w_jumplistidx < curwin->w_jumplistlen) | |
164 { | |
165 tempmark = curwin->w_jumplist[curwin->w_jumplistlen - 1]; | |
166 for (i = curwin->w_jumplistlen - 1; i > 0; --i) | |
167 curwin->w_jumplist[i] = curwin->w_jumplist[i - 1]; | |
168 curwin->w_jumplist[0] = tempmark; | |
169 ++curwin->w_jumplistidx; | |
170 } | |
171 # endif | |
172 | |
173 // If jumplist is full: remove oldest entry | 152 // If jumplist is full: remove oldest entry |
174 if (++curwin->w_jumplistlen > JUMPLISTSIZE) | 153 if (++curwin->w_jumplistlen > JUMPLISTSIZE) |
175 { | 154 { |
176 curwin->w_jumplistlen = JUMPLISTSIZE; | 155 curwin->w_jumplistlen = JUMPLISTSIZE; |
177 vim_free(curwin->w_jumplist[0].fname); | 156 vim_free(curwin->w_jumplist[0].fname); |