[PATCH 4/8] SymbolView: Avoid unneeded update of current item

loh.tar loh.tar at googlemail.com
Sun Jul 22 14:04:40 BST 2018


- Increase cursor update delay timer 100->200ms
- Stop cursor delay timer when document is edited
---
 addons/symbolviewer/plugin_katesymbolviewer.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/addons/symbolviewer/plugin_katesymbolviewer.cpp b/addons/symbolviewer/plugin_katesymbolviewer.cpp
index 1e08d0a2c..bb75bb9ab 100644
--- a/addons/symbolviewer/plugin_katesymbolviewer.cpp
+++ b/addons/symbolviewer/plugin_katesymbolviewer.cpp
@@ -227,12 +227,13 @@ void KatePluginSymbolViewerView::slotDocChanged()
 
 void KatePluginSymbolViewerView::slotDocEdited()
 {
+  m_currItemTimer.stop(); // Avoid unneeded update
   m_updateTimer.start(500);
 }
 
 void KatePluginSymbolViewerView::cursorPositionChanged()
 {
-  m_currItemTimer.start(100);
+  m_currItemTimer.start(200);
 }
 
 void KatePluginSymbolViewerView::updateCurrTreeItem()
-- 
2.18.0



More information about the KWrite-Devel mailing list