File tree 1 file changed +12
-6
lines changed
1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -296,9 +296,12 @@ A negative argument means move backward that many keywords."
296
296
(user-error " No more matches" )))))
297
297
(cl-decf arg))
298
298
(when (> arg 0 )
299
- (goto-char (point-min ))
300
- (let ((hl-todo-wrap-movement nil ))
301
- (hl-todo-next arg)))))
299
+ (let ((pos (save-excursion
300
+ (goto-char (point-min ))
301
+ (let ((hl-todo-wrap-movement nil ))
302
+ (hl-todo-next arg))
303
+ (point ))))
304
+ (goto-char pos)))))
302
305
303
306
;;;### autoload
304
307
(defun hl-todo-previous (arg )
@@ -320,9 +323,12 @@ A negative argument means move forward that many keywords."
320
323
(goto-char (match-end 0 ))
321
324
(cl-decf arg))
322
325
(when (> arg 0 )
323
- (goto-char (point-max ))
324
- (let ((hl-todo-wrap-movement nil ))
325
- (hl-todo-previous arg)))))
326
+ (let ((pos (save-excursion
327
+ (goto-char (point-max ))
328
+ (let ((hl-todo-wrap-movement nil ))
329
+ (hl-todo-previous arg))
330
+ (point ))))
331
+ (goto-char pos)))))
326
332
327
333
;;;### autoload
328
334
(defun hl-todo-occur ()
You can’t perform that action at this time.
0 commit comments