Ticket #3487 (closed defect: fixed)
mcedit: wrong highlighting in presence of "#define \\" (i. e. preprocessor directives)
Reported by: | safinaskar | Owned by: | andrew_b |
---|---|---|---|
Priority: | major | Milestone: | 4.8.23 |
Component: | mcedit | Version: | 4.8.14 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master |
Description (last modified by andrew_b) (diff)
The following code
#define a b // int main (void)
highlights wrongly. I. e. "int" highlights as comment. But gcc 4.9.2 in C mode doesn't think this is a comment
--
$ /opt/mc/bin/mcedit -V
GNU Midnight Commander 4.8.14
Built with GLib 2.42.1
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, fish
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
Attachments
Change History
comment:2 Changed 6 years ago by andrew_b
From #3969
#endif // preprocessor macro with one-line comment int code; /* <-- this line is colorized incorrectly */ int code2; /* <-- next line is colorized properly */ /* this preprocessor macro is not colorized, when there is whitespace before '#' and the next line is not empty */ #if not_colorized int code3; /* this preprocessor macro is colorized properly, the next line is empty */ #if colorized int code4;
Changed 6 years ago by andrew_b
- Attachment 0001-mcedit-fixed-invalid-syntax-highlighting-when-both-c.patch added
Changed 6 years ago by andrew_b
- Attachment 0002-mcedit-fixed-syntax-highlighting-bug-in-.c-and-.cxx-.patch added
comment:3 Changed 6 years ago by andrew_b
Ticket #3969 has been marked as a duplicate of this ticket.
comment:4 Changed 6 years ago by andrew_b
- Status changed from new to accepted
- Owner set to andrew_b
- Branch state changed from no branch to on review
- Milestone changed from Future Releases to 4.8.23
Branch: 3487_syntax_highlighting_fixes
Initial changeset:047512dfb2f1237b03b9fd31713dcd94454c7e5d
comment:5 Changed 6 years ago by andrew_b
- Votes for changeset set to andrew_b
- Branch state changed from on review to approved
comment:6 Changed 6 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from andrew_b to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged
Merged to master: [e2b8a50cea04bc91c3a4181a4e79392573b77e62].
git log --pretty=oneline e806c2b..e2b8a50