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 262451 - Syntax - preprocessor text not synchronizing with its syntax highight
Summary: Syntax - preprocessor text not synchronizing with its syntax highight
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-16 06:44 UTC by mariusz_m
Modified: 2016-06-18 03:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
formatted correctly (31.88 KB, image/png)
2016-06-16 06:44 UTC, mariusz_m
Details
after a few characters inserted before EMIT_PRAGMA (31.62 KB, image/png)
2016-06-16 06:47 UTC, mariusz_m
Details
and this is literally sh*i (39.68 KB, image/png)
2016-06-16 06:47 UTC, mariusz_m
Details
imc test - preprocessor highlighter (3.65 KB, image/png)
2016-06-16 08:58 UTC, mariusz_m
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mariusz_m 2016-06-16 06:44:38 UTC
Created attachment 160063 [details]
formatted correctly

This issue appeared with NB 8.1
Currently I am using NB 8.1 with latest updates and C++ code containing preprocessor macros, after any inset/delete operation, looks like a shit. Seriously, I can't ignore it anymore. NB is the only IDE in the world having such a problem - obviously the highlighter attributes and text are stored separately, instead of in int32, 16bit for character and 16bit for color/style attributes.
This results in behavior like on the screenshot. 
To clarify: when file is opened for the first, time ,everything looks fine, but when I start inserting text, the text is moving, but highlight attributes stays at the same location.
After Code assistance -> Reparse projects it get back to normal. But come on - I can't doing this for every modified line of code!
Comment 1 mariusz_m 2016-06-16 06:47:08 UTC
Created attachment 160064 [details]
after a few characters inserted before EMIT_PRAGMA
Comment 2 mariusz_m 2016-06-16 06:47:52 UTC
Created attachment 160065 [details]
and this is literally sh*i
Comment 3 Vladimir Voskresensky 2016-06-16 07:39:55 UTC
I agree, it is very annoying. We have fixed some async in 8.1 patches, but probably not all.
Alexander, could investigate with user's help what remains unfixed.
Comment 4 Alexander Simon 2016-06-16 07:48:05 UTC
Hi mariusz_m,

Please, provide reproducible sample. It help us to fix the issue.

Alexander
Comment 5 mariusz_m 2016-06-16 08:38:54 UTC
Hi,
I need to find something because I cannot share my company code
Regards, Mariusz
Comment 6 mariusz_m 2016-06-16 08:57:50 UTC
Please download this project:
https:// bitbucket.org/mmidor/imc/branches/
There is NB project configured for MinGW-4.8

1. Open file test_imc.cpp
2. go to line 22, beetween // --- and TEST_GROUP(IMC)
3. start typing some test before TEST_GROUP() - with every new character inserted, TEST_GROUP characters color will change from preprocessor style to regular (in my case: purple -> white) - see attachment
Comment 7 mariusz_m 2016-06-16 08:58:14 UTC
Created attachment 160066 [details]
imc test - preprocessor highlighter
Comment 8 Alexander Simon 2016-06-16 10:10:34 UTC
(In reply to mariusz_m from comment #6)
> Please download this project:
> https:// bitbucket.org/mmidor/imc/branches/
> There is NB project configured for MinGW-4.8
> 
> 1. Open file test_imc.cpp
> 2. go to line 22, beetween // --- and TEST_GROUP(IMC)
> 3. start typing some test before TEST_GROUP() - with every new character
> inserted, TEST_GROUP characters color will change from preprocessor style to
> regular (in my case: purple -> white) - see attachment

Thanks, i can reproduce the issue.
Comment 9 Alexander Simon 2016-06-16 13:54:06 UTC
It is regression after fixing bug #258433
Comment 10 Alexander Simon 2016-06-16 15:24:58 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/ba1d2b964049
Comment 11 Quality Engineering 2016-06-18 03:12:50 UTC
Integrated into 'main-silver', will be available in build *201606180002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ba1d2b964049
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #262451 Syntax - preprocessor text not synchronizing with its syntax highight