From: Kornel Benko Date: Fri, 3 Jan 2020 12:08:32 +0000 (+0100) Subject: Adv search: fix handling of multiple params of a latex command X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2f848cb924251856c78bad04837529f41378d01e;p=features.git Adv search: fix handling of multiple params of a latex command Fix the case of possibly nested parentheses --- diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index d45fdd32cf..fa00b88074 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -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; }