From c9eb5728886fc4e547ae6effd56cc62a0ea733a0 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Mon, 28 Feb 2011 16:59:12 +0300 Subject: [PATCH] IDEA-65927 Switcher: on closing all editor windows in switcher arrow keys do not move the selection --- .../src/com/intellij/ide/actions/Switcher.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platform/platform-impl/src/com/intellij/ide/actions/Switcher.java b/platform/platform-impl/src/com/intellij/ide/actions/Switcher.java index c51575c075a5..70431003e40d 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/Switcher.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/Switcher.java @@ -463,6 +463,15 @@ public class Switcher extends AnAction implements DumbAware { ((DefaultListModel)jList.getModel()).removeElementAt(selectedIndex); this.remove(jList); this.remove(separator); + final Dimension size = toolWindows.getSize(); + myPopup.setSize(new Dimension(size.width, myPopup.getSize().height)); + final IdeFocusManager focusManager = IdeFocusManager.getInstance(project); + focusManager.doWhenFocusSettlesDown(new Runnable() { + @Override + public void run() { + focusManager.requestFocus(SwitcherPanel.this, true); + } + }); } else { goForward(); ((DefaultListModel)jList.getModel()).removeElementAt(selectedIndex);