Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Notify editor when commandmode ends

  • Loading branch information...
commit e637f6ee5f7e743a6d35ce32e1bd70afb131f39c 1 parent 9e7d8c8
Alexander Stigsen authored
5 src/DiffPanel.cpp
View
@@ -203,3 +203,8 @@ EditorCtrl* DiffPanel::GetActiveEditor()
{
return m_currentEditor;
}
+
+void DiffPanel::CommandModeEnded() {
+ m_leftEditor->CommandModeEnded();
+ m_rightEditor->CommandModeEnded();
+}
1  src/DiffPanel.h
View
@@ -47,6 +47,7 @@ class DiffPanel : public wxPanel, public ITabPage {
virtual EditorCtrl* GetActiveEditor();
virtual const char** RecommendedIcon() const;
+ virtual void CommandModeEnded();
private:
// Event handlers
4 src/EditorBundlePanel.cpp
View
@@ -177,6 +177,10 @@ void EditorBundlePanel::SaveSettings(unsigned int i, eFrameSettings& settings) {
m_editorCtrl->SaveSettings(i, settings);
}
+void EditorBundlePanel::CommandModeEnded() {
+ m_editorCtrl->CommandModeEnded();
+}
+
bool EditorBundlePanel::Show(bool show) {
// When hiding, we want to hide panel first to avoid flicker
bool result = false;
1  src/EditorBundlePanel.h
View
@@ -47,6 +47,7 @@ class EditorBundlePanel : public wxPanel, public IUpdatePanel, public ITabPage {
virtual EditorCtrl* GetActiveEditor();
virtual const char** RecommendedIcon() const;
virtual void SaveSettings(unsigned int i, eFrameSettings& settings);
+ virtual void CommandModeEnded();
private:
void Init();
5 src/EditorCtrl.cpp
View
@@ -497,6 +497,11 @@ EditorCtrl* EditorCtrl::GetActiveEditor() { return this; }
const char** EditorCtrl::RecommendedIcon() const { return document_xpm; }
+void EditorCtrl::CommandModeEnded() {
+ ClearSearchRange();
+ m_commandHandler.Clear();
+}
+
void EditorCtrl::ClearRemoteInfo() {
if (m_remotePath.empty()) return;
1  src/EditorCtrl.h
View
@@ -171,6 +171,7 @@ class EditorCtrl : public KeyHookable<wxControl>,
virtual EditorCtrl* GetActiveEditor();
virtual const char** RecommendedIcon() const;
virtual void SaveSettings(unsigned int i, eFrameSettings& settings);
+ virtual void CommandModeEnded();
// Bundle Editing
bool IsBundleItem() const {return m_remotePath.StartsWith(wxT("bundle://"));};
1  src/EditorFrame.cpp
View
@@ -2055,6 +2055,7 @@ void EditorFrame::ShowCommandMode(bool show) {
}
else {
box->Hide(m_commandPanel);
+ editorCtrl->CommandModeEnded();
editorCtrl->SetFocus();
}
box->Layout();
1  src/ITabPage.h
View
@@ -10,6 +10,7 @@ class ITabPage {
virtual EditorCtrl* GetActiveEditor() = 0;
virtual const char** RecommendedIcon() const = 0;
virtual void SaveSettings(unsigned int i, eFrameSettings& settings) = 0;
+ virtual void CommandModeEnded() = 0;
};
#endif // __ITABPAGE_H__
Please sign in to comment.
Something went wrong with that request. Please try again.