File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -289,16 +289,20 @@ a more user friendly representation of SPEC-FORM."
289289(defun cider-browse-spec--next-spec ()
290290 " Move to the next spec in the buffer."
291291 (interactive )
292- (goto-char (next-single-property-change (point ) 'spec-name ))
293- (unless (get-text-property (point ) 'spec-name )
294- (goto-char (next-single-property-change (point ) 'spec-name ))))
292+ (when-let ((pos (next-single-property-change (point ) 'spec-name )))
293+ (if (get-text-property (point ) 'spec-name )
294+ (when-let ((next-pos (next-single-property-change pos 'spec-name )))
295+ (goto-char next-pos))
296+ (goto-char pos))))
295297
296298(defun cider-browse-spec--prev-spec ()
297299 " Move to the previous spec in the buffer."
298300 (interactive )
299- (goto-char (previous-single-property-change (point ) 'spec-name ))
300- (unless (get-text-property (point ) 'spec-name )
301- (goto-char (previous-single-property-change (point ) 'spec-name ))))
301+ (when-let ((pos (previous-single-property-change (point ) 'spec-name )))
302+ (if (get-text-property (point ) 'spec-name )
303+ (when-let ((prev-pos (previous-single-property-change pos 'spec-name )))
304+ (goto-char prev-pos))
305+ (goto-char pos))))
302306
303307(defun cider-browse-spec--print-curr-spec-example ()
304308 " Generate and print an example of the current spec."
You can’t perform that action at this time.
0 commit comments