[rkward] rkward/windows: Only invoke symbol name completion when at the end of a symbol, not in the middle.

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Mon May 4 08:48:33 UTC 2015


Git commit efa9dfdb5f576710a7338913fd71173744cd2889 by Thomas Friedrichsmeier.
Committed on 04/05/2015 at 08:47.
Pushed by tfry into branch 'master'.

Only invoke symbol name completion when at the end of a symbol, not in the middle.

M  +2    -1    rkward/windows/rkcommandeditorwindow.cpp

http://commits.kde.org/rkward/efa9dfdb5f576710a7338913fd71173744cd2889

diff --git a/rkward/windows/rkcommandeditorwindow.cpp b/rkward/windows/rkcommandeditorwindow.cpp
index e0c4d3a..c734766 100644
--- a/rkward/windows/rkcommandeditorwindow.cpp
+++ b/rkward/windows/rkcommandeditorwindow.cpp
@@ -2,7 +2,7 @@
                           rkcommandeditorwindow  -  description
                              -------------------
     begin                : Mon Aug 30 2004
-    copyright            : (C) 2004-2014 by Thomas Friedrichsmeier
+    copyright            : (C) 2004-2015 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -639,6 +639,7 @@ void RKCommandEditorWindow::tryCompletion () {
 	int start;
 	int end;
 	RKCommonFunctions::getCurrentSymbolOffset (current_line, cursor_pos, false, &start, &end);
+	if (end > cursor_pos) return;   // Only hint when at the end of a word/symbol: https://mail.kde.org/pipermail/rkward-devel/2015-April/004122.html
 
 	KTextEditor::Range range = KTextEditor::Range (para, start, para, end);
 	QString word;



More information about the rkward-tracker mailing list