0

Problem: When pressing TAB in the minibuffer to get completions, the cursor is moved to the window of whatever file I am editing.

Expected result: Pressing TAB in the minibuffer should keep the cursor in the minibuffer (or move it to the Completions window).

Actual result: Pressing TAB in the minibuffer moves the cursor to the window of the file I'm editing, requiring me to move it back to the minibuffer to continue working. This only happens when a Completions window is opened.

How can I keep the cursor in the minibuffer after tab completion?

1
  • 1
    Do you still have the problem if you start emacs without your init file (emacs -Q)?
    – Dan
    Jul 12, 2017 at 17:51

1 Answer 1

0

The problem was caused by this portion of my init file:

(defadvice split-window (after move-point-to-new-window activate)
  "Moves the point to the newly created window after splitting."
  (other-window 1))

This code is from a StackOverflow answer to the question, How can I switch focus after buffer split in emacs? The answer was edited recently stating that the code should not be used because of too many unintended side effects.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.