Index: src/sdk/editormanager.cpp
===================================================================
--- src/sdk/editormanager.cpp	(revision 8394)
+++ src/sdk/editormanager.cpp	(working copy)
@@ -58,8 +58,8 @@
 template<> EditorManager* Mgr<EditorManager>::instance = 0;
 template<> bool  Mgr<EditorManager>::isShutdown = false;
 
-int ID_NBEditorManager = wxNewId();
-int ID_EditorManager = wxNewId();
+int ID_NBEditorManager        = wxNewId();
+int ID_EditorManager          = wxNewId();
 int idEditorManagerCheckFiles = wxNewId();
 
 // static
@@ -144,23 +144,36 @@
     return  ((findText.Find(_T("\n")) != wxNOT_FOUND) || (findText.Find(_T("\r")) != wxNOT_FOUND));
 }
 
-static const int idNBTabSplitHorz = wxNewId();
-static const int idNBTabSplitVert = wxNewId();
-static const int idNBTabUnsplit = wxNewId();
-static const int idNBTabClose = wxNewId();
-static const int idNBTabCloseAll = wxNewId();
-static const int idNBTabCloseAllOthers = wxNewId();
-static const int idNBTabSave = wxNewId();
-static const int idNBTabSaveAll = wxNewId();
-static const int idNBSwapHeaderSource = wxNewId();
+// needed for initialization of variables
+int editormanager_RegisterId(int id)
+{
+    wxRegisterId(id);
+    return id;
+}
+
+static const int idNBTabSplitHorz            = wxNewId();
+static const int idNBTabSplitVert            = wxNewId();
+static const int idNBTabUnsplit              = wxNewId();
+static const int idNBTabClose                = wxNewId();
+static const int idNBTabCloseAll             = wxNewId();
+static const int idNBTabCloseAllOthers       = wxNewId();
+static const int idNBTabSave                 = wxNewId();
+static const int idNBTabSaveAll              = wxNewId();
+static const int idNBSwapHeaderSource        = wxNewId();
 static const int idNBTabOpenContainingFolder = wxNewId();
-static const int idNBTabTop = wxNewId();
-static const int idNBTabBottom = wxNewId();
-static const int idNBProperties = wxNewId();
-static const int idNBAddFileToProject = wxNewId();
-static const int idNBRemoveFileFromProject = wxNewId();
-static const int idNBShowFileInTree = wxNewId();
+static const int idNBTabTop                  = wxNewId();
+static const int idNBTabBottom               = wxNewId();
+static const int idNBProperties              = wxNewId();
+static const int idNBAddFileToProject        = wxNewId();
+static const int idNBRemoveFileFromProject   = wxNewId();
+static const int idNBShowFileInTree          = wxNewId();
 
+// The following lines reserve 255 consecutive id's
+static const int EditorMaxSwitchTo           = 255;
+static const int idNBSwitchFile1             = wxNewId();
+static const int idNBSwitchFileMax           = editormanager_RegisterId(idNBSwitchFile1 + EditorMaxSwitchTo - 1);
+
+
 /** *******************************************************
   * struct EditorManagerInternalData                      *
   * This is the private data holder for the EditorManager *
@@ -191,6 +204,7 @@
     EVT_AUINOTEBOOK_PAGE_CHANGING(ID_NBEditorManager, EditorManager::OnPageChanging)
     EVT_AUINOTEBOOK_PAGE_CLOSE(ID_NBEditorManager, EditorManager::OnPageClose)
     EVT_AUINOTEBOOK_TAB_RIGHT_UP(ID_NBEditorManager, EditorManager::OnPageContextMenu)
+    EVT_MENU_RANGE(idNBSwitchFile1, idNBSwitchFileMax, EditorManager::OnGenericContextMenuHandler)
     EVT_MENU(idNBTabSplitHorz, EditorManager::OnGenericContextMenuHandler)
     EVT_MENU(idNBTabSplitVert, EditorManager::OnGenericContextMenuHandler)
     EVT_MENU(idNBTabUnsplit, EditorManager::OnGenericContextMenuHandler)
@@ -2703,6 +2717,12 @@
         ed->Split(cbEditor::stVertical);
     else if (id == idNBTabUnsplit && ed)
         ed->Unsplit();
+    else if (id >= idNBSwitchFile1 && id <= idNBSwitchFileMax)
+    {
+        EditorBase *const ed = GetEditor(id - idNBSwitchFile1);
+        if (ed)
+            SetActiveEditor(ed);
+    }
 }
 
 void EditorManager::OnPageChanged(wxAuiNotebookEvent& event)
@@ -2816,6 +2836,28 @@
     if (event.GetSelection() == -1)
         return;
 
+    if (wxGetKeyState(WXK_CONTROL) && GetEditorsCount() > 1)
+    {
+        wxMenu* pop = new wxMenu;
+        EditorBase* current = GetActiveEditor();
+        for (int i = 0; i < EditorMaxSwitchTo && i < GetEditorsCount(); ++i)
+        {
+            EditorBase* other = GetEditor(i);
+            if (!other)
+                continue;
+            if (other == current)
+            {
+                pop->AppendCheckItem(wxID_ANY, other->GetShortName()); // do nothing if the current tab is selected
+                pop->FindItemByPosition(pop->GetMenuItemCount() - 1)->Check(); // and mark it as active
+            }
+            else
+                pop->Append(idNBSwitchFile1 + i, other->GetShortName());
+        }
+        m_pNotebook->PopupMenu(pop);
+        delete pop;
+        return;
+    }
+
     // select the notebook that sends the event, because the context menu-entries act on the actual selected tab
     m_pNotebook->SetSelection(event.GetSelection());
     wxMenu* pop = new wxMenu;
Index: src/sdk/editorbase.cpp
===================================================================
--- src/sdk/editorbase.cpp	(revision 8394)
+++ src/sdk/editorbase.cpp	(working copy)
@@ -281,7 +281,7 @@
             text = control->GetTextRange(control->WordStartPosition(pos, true), control->WordEndPosition(pos, true));
         }
 
-        if (wxMinimumVersion<2,6,1>::eval)
+        if (wxMinimumVersion<2,6,1>::eval && !text.IsEmpty())
         {
             popup->Append(idGoogle, _("Search the Internet for \"") + text + _("\""));
             popup->Append(idMsdn, _("Search MSDN for \"") + text + _("\""));
@@ -292,7 +292,8 @@
         wxMenu* switchto = CreateContextSubMenu(idSwitchTo);
         if (switchto)
         {
-            popup->AppendSeparator();
+            if (popup->GetMenuItemCount() > 0)
+                popup->AppendSeparator();
             popup->Append(idSwitchTo, _("Switch to"), switchto);
         }
     }
@@ -383,8 +384,7 @@
     {
         Manager::Get()->GetEditorManager()->SaveAll();
     }
-    else
-    if (id >= idSwitchFile1 && id <= idSwitchFileMax)
+    else if (id >= idSwitchFile1 && id <= idSwitchFileMax)
     {
         // "Switch to..." item
         EditorBase *const ed = m_SwitchTo[id];

