[Bug 362537] extragear/office/kile/src

tbraun braun at physik.fu-berlin.de
Tue Apr 21 21:33:55 UTC 2009


SVN commit 957364 by tbraun:

don't crash while inserting intelligent double quotes.

CCMAIL: 362537 at bugs.launchpad.net


 M  +5 -2      editorextension.cpp  


--- trunk/extragear/office/kile/src/editorextension.cpp #957363:957364
@@ -1336,11 +1336,14 @@
 
 	QVector<KTextEditor::Range> foundRanges = iface->searchText(searchRange, m_reg.pattern(), searchOptions);
 
+	KILE_DEBUG() << "number of ranges " << foundRanges.count();
+
 	EnvTag wrong_env = (backwards) ? EnvEnd : EnvBegin;
 
-	for(QVector<KTextEditor::Range>::iterator i = foundRanges.begin(); i != foundRanges.end(); ++i) {
+	// it is +5 here because every search returns at least 5 ranges, because the regexp contains 4 capturing parantheses (full match + 4 =5 )
+	for(QVector<KTextEditor::Range>::iterator i = foundRanges.begin(); i < foundRanges.end(); i+=5) {
 		KTextEditor::Range range = *i;
-		KILE_DEBUG() << doc->text(*i);
+		KILE_DEBUG() << "text is " << doc->text(*i);
 		if(!range.isValid()) {
 			break;
 		}

-- 
Kile crashes with SIGSEGV on entering a double quote if "abstract" is commented out
https://bugs.launchpad.net/bugs/362537
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to kile in ubuntu.




More information about the kubuntu-bugs mailing list