[frameworks-ktexteditor] [Bug 385472] Incorrect indentation in nested 'if' statements without braces
https://bugs.kde.org/show_bug.cgi?id=385472 Christoph Cullmann changed: What|Removed |Added Latest Commit||https://invent.kde.org/fram ||eworks/ktexteditor/commit/f ||1b94f2f8367a07e4ed4b8e33f60 ||61383b3aa44f --- Comment #8 from Christoph Cullmann --- Git commit f1b94f2f8367a07e4ed4b8e33f6061383b3aa44f by Christoph Cullmann, on behalf of Waqar Ahmed. Committed on 23/01/2022 at 18:31. Pushed by waqar into branch 'master'. Handle single statement condition blocks better See test case for full detail of what is fixed. Essentially it is that if you have something like: ``` if (true) doWork(); ``` and the cursor is on the semicolon, pressing enter should decrease indent level to that of the `if` statement. A +8-0autotests/input/indent/cstyle/385472/expected A +3-0autotests/input/indent/cstyle/385472/input.js A +7-0autotests/input/indent/cstyle/385472/origin M +34 -1src/script/data/indentation/cstyle.js https://invent.kde.org/frameworks/ktexteditor/commit/f1b94f2f8367a07e4ed4b8e33f6061383b3aa44f -- You are receiving this mail because: You are watching all bug changes.
[frameworks-ktexteditor] [Bug 385472] Incorrect indentation in nested 'if' statements without braces
https://bugs.kde.org/show_bug.cgi?id=385472 Waqar Ahmed changed: What|Removed |Added Status|ASSIGNED|RESOLVED Version Fixed In||5.91 Resolution|--- |FIXED CC||waqar@gmail.com --- Comment #7 from Waqar Ahmed --- Fixed with 5.91 -- You are receiving this mail because: You are watching all bug changes.
[frameworks-ktexteditor] [Bug 385472] Incorrect indentation in nested 'if' statements without braces
https://bugs.kde.org/show_bug.cgi?id=385472 --- Comment #6 from Bug Janitor Service --- A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/266 -- You are receiving this mail because: You are watching all bug changes.
[frameworks-ktexteditor] [Bug 385472] Incorrect indentation in nested 'if' statements without braces
https://bugs.kde.org/show_bug.cgi?id=385472 Bug Janitor Service changed: What|Removed |Added Status|CONFIRMED |ASSIGNED --- Comment #5 from Bug Janitor Service --- A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/259 -- You are receiving this mail because: You are watching all bug changes.
[frameworks-ktexteditor] [Bug 385472] Incorrect indentation in nested 'if' statements without braces
https://bugs.kde.org/show_bug.cgi?id=385472 --- Comment #4 from Karthik Periagaram --- (In reply to Ahmad Samir from comment #3) > The first "if" must use curly braces because the nested if is intended to be > executed as a block, IIUC... (mind you, I only know C++, not C). That is not correct. The nested conditional construct without explicitly marking off the block scope with {} is valid in both C and C++. -- You are receiving this mail because: You are watching all bug changes.
[frameworks-ktexteditor] [Bug 385472] Incorrect indentation in nested 'if' statements without braces
https://bugs.kde.org/show_bug.cgi?id=385472 Ahmad Samir changed: What|Removed |Added CC||a.samir...@gmail.com --- Comment #3 from Ahmad Samir --- The first "if" must use curly braces because the nested if is intended to be executed as a block, IIUC... (mind you, I only know C++, not C). -- You are receiving this mail because: You are watching all bug changes.
[frameworks-ktexteditor] [Bug 385472] Incorrect indentation in nested 'if' statements without braces
https://bugs.kde.org/show_bug.cgi?id=385472 Karthik Periagaram changed: What|Removed |Added CC||karthik.periaga...@gmail.co ||m Platform|Other |Archlinux Packages Version|5.38.0 |5.58.0 --- Comment #2 from Karthik Periagaram --- Confirmed using latest released packages. Updating version to indicate. Tested using Arch linux packages (KDE frameworks 5.58.0, Qt 5.12.3, Kwrite 19.04.1). -- You are receiving this mail because: You are watching all bug changes.
[frameworks-ktexteditor] [Bug 385472] Incorrect indentation in nested 'if' statements without braces
https://bugs.kde.org/show_bug.cgi?id=385472 Edward Kigwana changed: What|Removed |Added Status|REPORTED|CONFIRMED Summary|Incorrect indentation in|Incorrect indentation in |nested 'if' statements |nested 'if' statements ||without braces CC||edwardw...@gmail.com Ever confirmed|0 |1 --- Comment #1 from Edward Kigwana --- With braces it works as expected. int f() { if (1) { if (1) f(); else f(); } else { f(); } } -- You are receiving this mail because: You are watching all bug changes.