Skip to content

Commit 10bfc1c

Browse files
committed
fix removing specialDef twice
1 parent 60fbd2b commit 10bfc1c

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/latexdocument.cpp

+4-13
Original file line numberDiff line numberDiff line change
@@ -1215,19 +1215,10 @@ void LatexDocument::removeLineElements(QDocumentLineHandle *dlh, HandledData &ch
12151215
}
12161216
}
12171217
}else{
1218-
if(elem.startsWith("%")){
1219-
int i = elem.indexOf('%', 1);
1220-
QString category = elem.left(i);
1221-
QString wrd = elem.mid(i + 1);
1222-
if(countCommandDefintions("",elem)==1){
1223-
ltxCommands.possibleCommands[category].remove(wrd);
1224-
}
1225-
}else{
1226-
int i = elem.indexOf("{");
1227-
if (i >= 0) elem = elem.left(i);
1228-
if(countCommandDefintions(elem)==1){
1229-
ltxCommands.possibleCommands["user"].remove(elem);
1230-
}
1218+
int i = elem.indexOf("{");
1219+
if (i >= 0) elem = elem.left(i);
1220+
if(countCommandDefintions(elem)==1){
1221+
ltxCommands.possibleCommands["user"].remove(elem);
12311222
}
12321223
}
12331224
if(cmd.snippet.type==CodeSnippet::userConstruct)

0 commit comments

Comments
 (0)