From ae7a7fa882297d4f95edb8d707b1da8996236e60 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Fri, 3 Jan 2020 13:08:32 +0100 Subject: [PATCH] Adv search: fix handling of multiple params of a latex command Fix the case of possibly nested parentheses --- src/lyxfind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.2