Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mcedit: wrong highlighting in presence of "#define \\" (i. e. preprocessor directives) #3487

Closed
mc-butler opened this issue Jun 24, 2015 · 9 comments
Assignees
Labels
area: mcedit mcedit, the built-in text editor prio: medium Has the potential to affect progress ver: 4.8.14 Reproducible in version 4.8.14
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3487
Reporter safinaskar (@safinaskar)

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;

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 8, 2019 at 7:51 UTC (comment 1)

  • Description edited

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 8, 2019 at 7:52 UTC (comment 2)

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;

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 8, 2019 at 7:56 UTC (comment 3)

Ticket #3969 has been marked as a duplicate of this ticket.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 8, 2019 at 8:17 UTC (comment 4)

  • Milestone changed from Future Releases to 4.8.23
  • Branch state changed from no branch to on review
  • Status changed from new to accepted
  • Owner set to andrew_b

Branch: 3487_syntax_highlighting_fixes
Initial [047512dfb2f1237b03b9fd31713dcd94454c7e5d]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 9, 2019 at 7:39 UTC (comment 5)

  • Branch state changed from on review to approved
  • Votes set to andrew_b

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 9, 2019 at 7:41 UTC (comment 6)

  • Resolution set to fixed
  • Branch state changed from approved to merged
  • Votes changed from andrew_b to committed-master
  • Status changed from accepted to testing

Merged to master: [e2b8a50].

git log --pretty=oneline e806c2b..e2b8a50

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 9, 2019 at 7:42 UTC (comment 7)

  • Status changed from testing to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: mcedit mcedit, the built-in text editor prio: medium Has the potential to affect progress ver: 4.8.14 Reproducible in version 4.8.14
Development

No branches or pull requests

2 participants