diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp
index d3b41cb087d35b2fe5ee55f283b3724784acdbae..6377fe226d34856cab13aad849cd4ad418a76b0d 100644
--- a/src/plugins/qmljseditor/qmljseditor.cpp
+++ b/src/plugins/qmljseditor/qmljseditor.cpp
@@ -711,8 +711,12 @@ QmlJSTextEditor::QmlJSTextEditor(QWidget *parent) :
 
     m_modelManager = ExtensionSystem::PluginManager::instance()->getObject<ModelManagerInterface>();
     m_contextPane = ExtensionSystem::PluginManager::instance()->getObject<QmlJS::IContextPane>();
-    if (m_contextPane)
+
+
+    if (m_contextPane) {
         connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(onCursorPositionChanged()));
+        connect(m_contextPane, SIGNAL(closed()), this, SLOT(showTextMarker()));
+    }
     m_oldCursorPosition = -1;
 
     if (m_modelManager) {
@@ -975,11 +979,20 @@ void QmlJSTextEditor::updateCursorPositionNow()
                 }
             }
             setRefactorMarkers(markers);
+        } else {
+            QList<TextEditor::Internal::RefactorMarker> markers;
+            setRefactorMarkers(markers);
         }
         m_oldCursorPosition = position();
     }
 }
 
+void QmlJSTextEditor::showTextMarker()
+{
+    m_oldCursorPosition = -1;
+    updateCursorPositionNow();
+}
+
 void QmlJSTextEditor::updateUses()
 {
     m_updateUsesTimer->start();
@@ -1695,6 +1708,7 @@ void QmlJSTextEditor::updateSemanticInfo(const SemanticInfo &semanticInfo)
         Node *newNode = m_semanticInfo.declaringMemberNoProperties(position());
         if (newNode) {
             m_contextPane->apply(editableInterface(), doc, m_semanticInfo.snapshot, newNode, true);
+            showTextMarker();
         }
     }
 
diff --git a/src/plugins/qmljseditor/qmljseditor.h b/src/plugins/qmljseditor/qmljseditor.h
index 5f9765a7a117776f051fe43ee4780b5000dcbef4..562bd64b3ff7570ee8d7824a11d73b52c936d75f 100644
--- a/src/plugins/qmljseditor/qmljseditor.h
+++ b/src/plugins/qmljseditor/qmljseditor.h
@@ -244,6 +244,7 @@ private slots:
     void updateOutlineNow();
     void updateOutlineIndexNow();
     void updateCursorPositionNow();
+    void showTextMarker();
     void updateFileName();
 
     void updateUses();