Function: combobulate-cursor-goto-field

combobulate-cursor-goto-field is a natively compiled function defined in combobulate-cursor.el.

Signature

(combobulate-cursor-goto-field DIRECTION)

Documentation

Move to the next or previous field in DIRECTION.

Source Code

;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-cursor.el
(defun combobulate-cursor-goto-field (direction)
  "Move to the next or previous field in DIRECTION."
  (with-current-buffer combobulate-cursor--active-buffer
    (let* ((ovs (combobulate--refactor-get-overlays combobulate-cursor--refactor-id))
           (wnd (get-buffer-window combobulate-cursor--active-buffer))
           (window-point (window-point wnd)))
      (if-let (ov (if (eq direction 'next)
                      (seq-find (lambda (ov) (> (overlay-start ov) window-point)) ovs)
                    (seq-find (lambda (ov) (< (overlay-start ov) window-point)) (reverse ovs))))
          (set-window-point wnd (overlay-start ov))
        (user-error "No more fields in this direction.")))))