From df7492fc1d42342b68d6ffa7da2394c22baa2021 Mon Sep 17 00:00:00 2001 From: hanez Date: Tue, 30 Sep 2025 00:27:54 +0200 Subject: [PATCH] Reverted last commit. (0.12.5) --- CMakeLists.txt | 2 +- src/fun.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71c2019..1293377 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.16) -project(fun VERSION 0.12.4 LANGUAGES C) +project(fun VERSION 0.12.5 LANGUAGES C) set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) diff --git a/src/fun.c b/src/fun.c index f20ffcc..f22eedb 100644 --- a/src/fun.c +++ b/src/fun.c @@ -545,7 +545,7 @@ static int starts_with_kw(const char *s, const char *kw) { /* Compute how many indentation levels (2 spaces per level) are still open. * Only counts significant lines (non-blank, not comment-only), - * and ignores text inside comment blocks. */ + * and ignores text inside \/* ... *\/ block comments. */ static int compute_open_indent_blocks(const char *buf) { int in_block_comment = 0; int open = 0; @@ -618,7 +618,7 @@ static int compute_open_indent_blocks(const char *buf) { /* Detect if current buffer looks incomplete: * - Unclosed quotes (\' or \") with escapes - * - Unclosed comment block + * - Unclosed block comment \/* ... *\/ * - Parentheses not balanced * - Last significant line is a block header (if/else/while/for/fun) * - Line ends with an operator/comma