[Kst] branches/work/kst/portto4/kst/src/widgets

Joshua Netterfield drmrshdw at gmail.com
Thu Jul 28 20:16:30 CEST 2011


SVN commit 1243702 by joshuanetterfield:

Bugfixes


 M  +14 -2     cclineedit.cpp  


--- branches/work/kst/portto4/kst/src/widgets/cclineedit.cpp #1243701:1243702
@@ -154,7 +154,7 @@
         if(!_data[i].prefix().size()||!search.indexOf(_data[i].prefix())) {
             SVCCLineEdit* hack=dynamic_cast<SVCCLineEdit*>(widget());
             if(hack&&_data[i].prefix()==""&&_data[i].size()&&_data[i][0].title().contains("Fun")) {
-                QString operatorNextList="])Ie0123456789";
+                QString operatorNextList="])0123456789";
                 QString functionNextList="&=<>!+-/*&^|(";
                 int last1=-1,last2=-1;
                 for(int i=0;i<operatorNextList.size();i++) {
@@ -236,7 +236,7 @@
         if(caught) {
             search='[';
         } else {
-            const QString& possiblePhraseEndings=" =$.\n:/*]()%^&|!<>0245+1337-6789";
+            const QString& possiblePhraseEndings=" =$.\n:/*]()%^&|!<>0245+1337-6789\\";
             // also change in divide!!
             int maxIndex=-1;
             for(int j=0;j<possiblePhraseEndings.size();j++) {
@@ -254,7 +254,10 @@
                 x.remove(0,x.size());
             }
         }
+	if(search=='\\') {
+	    x.chop(1);
     }
+    }
     SetText(x+i+y);
     SetCursorPosition((x+i).size());
 
@@ -302,6 +305,15 @@
         }
     }
 
+    // this is a hard-coded exception to allow non-space-sperated Latex commands {
+    if(!caught&&x.lastIndexOf("\\")>x.lastIndexOf(search)&&x.lastIndexOf("\\"))
+    {
+	search=x[x.lastIndexOf("\\")-1];
+	qDebug()<<"EX.SEARCH IS NOW"<<search;
+	caught=1;
+	x.remove(0,x.lastIndexOf("\\"));
+    }
+    // }
     if(x.lastIndexOf(search)) {
         x.remove(0,x.lastIndexOf(search)+(caught?0:1));
     }


More information about the Kst mailing list