From e3ca03b4b307a327bfbd7cf9059f73e7073117fe Mon Sep 17 00:00:00 2001 From: Mirek Fidler Date: Wed, 1 Feb 2023 23:48:35 +0100 Subject: [PATCH] ide: clang-format fix --- uppsrc/ide/FormatCode.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/uppsrc/ide/FormatCode.cpp b/uppsrc/ide/FormatCode.cpp index 5e4b9c941..eed67b988 100644 --- a/uppsrc/ide/FormatCode.cpp +++ b/uppsrc/ide/FormatCode.cpp @@ -71,8 +71,9 @@ String Ide::FindClangFormatPath() return p; for(String dir : GetUppDirs()) - if(Check(dir)) - return p; + for(; dir.GetCount() > 3; dir = GetFileFolder(dir)) + if(Check(dir)) + return p; return Null; } @@ -385,6 +386,7 @@ ReformatDlg::ReformatDlg() view.SetReadOnly(); String p = TheIde()->FindClangFormatPath(); + DDUMP(p); if(p.GetCount()) base.Add(Null, ".clang-format file " + p); for(String id : { "LLVM", "Google", "Chromium", "Mozilla", "WebKit", "Microsoft", "GNU" })