]> git.lyx.org Git - features.git/commitdiff
Adv search: fix handling of multiple params of a latex command
authorKornel Benko <kornel@lyx.org>
Fri, 3 Jan 2020 12:08:32 +0000 (13:08 +0100)
committerKornel Benko <kornel@lyx.org>
Fri, 3 Jan 2020 12:11:47 +0000 (13:11 +0100)
Fix the case of possibly nested parentheses

src/lyxfind.cpp

index d45fdd32cf1737ff2417a7eedb7222b3d358b7b4..fa00b880743aa6092805d58766cf801f382583be 100644 (file)
@@ -1565,8 +1565,8 @@ int Intervall::findclosing(int start, int end, char up = '{', char down = '}', i
       depth++;
     }
     else if (c == down) {
-      repeat--;
       if (depth == 0) {
+        repeat--;
         if ((repeat <= 0) || (par[i+1] != up))
           return i;
       }