Skip to content

Commit

Permalink
fix removing specialDef twice
Browse files Browse the repository at this point in the history
  • Loading branch information
sunderme committed Nov 4, 2023
1 parent 60fbd2b commit 10bfc1c
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/latexdocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1215,19 +1215,10 @@ void LatexDocument::removeLineElements(QDocumentLineHandle *dlh, HandledData &ch
}
}
}else{
if(elem.startsWith("%")){
int i = elem.indexOf('%', 1);
QString category = elem.left(i);
QString wrd = elem.mid(i + 1);
if(countCommandDefintions("",elem)==1){
ltxCommands.possibleCommands[category].remove(wrd);
}
}else{
int i = elem.indexOf("{");
if (i >= 0) elem = elem.left(i);
if(countCommandDefintions(elem)==1){
ltxCommands.possibleCommands["user"].remove(elem);
}
int i = elem.indexOf("{");
if (i >= 0) elem = elem.left(i);
if(countCommandDefintions(elem)==1){
ltxCommands.possibleCommands["user"].remove(elem);
}
}
if(cmd.snippet.type==CodeSnippet::userConstruct)
Expand Down

0 comments on commit 10bfc1c

Please sign in to comment.