This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 108949 - Wrong code folds position if user separates line in preprocessor directive
Summary: Wrong code folds position if user separates line in preprocessor directive
Status: CLOSED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-05 14:50 UTC by soldatov
Modified: 2013-05-17 08:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2007-07-05 14:50:35 UTC
Steps:
- Open this file in editor:
------------------------------
#include <stdio.h>
#include <stdlib.h>

#define AAAAAA 12345
#if AAAAAA ==\
    12345
   
   #define BBB "1"
#else
   #define BBB "2"
#endif

int main(int argc, char** argv) {
    puts(BBB);
    return (EXIT_SUCCESS);
}

------------------------------
==> I see in editor (wrong code folds position):
 #if AAAAAA ==\
+    12345
|   
|   #define BBB "1"
|#else
|   #define BBB "2"
-#endif

Should be:
+ #if AAAAAA ==\
|    12345
|   
|   #define BBB "1"
|#else
|   #define BBB "2"
-#endif
Comment 1 Vladimir Voskresensky 2007-08-22 09:52:08 UTC
this is correct behavior,
because when we collapse fold it should be collapsed into:

   #if AAAAAA ==\
[+]    12345 [...]

to see the full #if statement
Comment 2 dnikitin 2007-12-18 16:48:48 UTC
closed