Here's my function:
(defun scroller-down () "Scrolling down conditional for buffer and minibuffer." (interactive) (if (active-minibuffer-window) (ivy-scroll-down-command) (scroll-down-command))) (defun scroller-up () "Scrolling up conditional for buffer and minibuffer." (interactive) (if (active-minibuffer-window) (ivy-scroll-up-command) (scroll-up-command)))
This function determines if the minibuffer is open.
If it is open and the cursor is in it, it will scroll in the minibuffer.
However, if it is open and the cursor is not in it, it will neither scroll in the minibuffer, nor the current buffer that the cursor is in.
My goal is to determine which scroll to use depending on if the cursor is in the minibuffer or not.
Is there a variable that returns true if the cursor position is in the minibuffer?
Also is there a better way to condense this function into one, and use a
cond to check if a certain key is pressed, thus activating the appropriate scroll function??