From: SourceForge.net <no...@so...> - 2012-01-15 21:54:29
|
Bugs item #1780785, was opened at 2007-08-23 22:57 Message generated for change (Comment added) made by ezust You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100588&aid=1780785&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: text area and syntax packages Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Bernard (bhelyer) Assigned to: Shlomy Reinstein (shlomy) Summary: C/C++ string syntax doesn't recognise '\' for strings Initial Comment: The C/C++ syntax highlighting doesn't recognise this (correct) syntax: 1 char paragraph[] = "There once was a string \ 2 that was far too long, so his father \ 3 cut him to pieces with newlines."; Lines 2 and 3 are not highlighted as strings when they should be. ---------------------------------------------------------------------- >Comment By: Alan Ezust (ezust) Date: 2012-01-15 13:54 Message: Shlomy, can you please open a fresh ticket on how to reproduce the text area corruption bug? Also, your attached patch does not have context and no longer is good. Please update it. ---------------------------------------------------------------------- Comment By: Kazutoshi Satoda (k_satoda) Date: 2009-12-07 08:39 Message: There are some more comments on #1235126 which was closed as a duplicate of this item. https://sourceforge.net/support/tracker.php?aid=1235126 An easy user side workaround is closing the quote at the end of line, and opening it again at the start of the next line. That is also a correct syntax, and less confusing for jEdit, other tools, and possibly some poeple. ---------------------------------------------------------------------- Comment By: Kazutoshi Satoda (k_satoda) Date: 2007-09-09 17:11 Message: Logged In: YES user_id=1483238 Originator: NO ISO C/C++ doesn't allow new-line characters in string leterals. I think the right way to fix this bug is escaping the new-line character which is immediately preceded by a backslash as non-line-break in syntax analysis. It will fix some other problems; e.g. multi line macro definitions. ---------------------------------------------------------------------- Comment By: Shlomy Reinstein (shlomy) Date: 2007-09-09 16:03 Message: Logged In: YES user_id=1477607 Originator: NO I've attached a tiny patch to the modes/c.xml mode file, which enables strings to span multiple lines. I don't know why the mode files limit strings to a single line, anyone knows? I think this is also the same for Java. ---------------------------------------------------------------------- Comment By: Shlomy Reinstein (shlomy) Date: 2007-09-09 16:02 Message: Logged In: YES user_id=1477607 Originator: NO File Added: cpatch ---------------------------------------------------------------------- Comment By: Shlomy Reinstein (shlomy) Date: 2007-08-24 04:30 Message: Logged In: YES user_id=1477607 Originator: NO The text area corruption in this example seems to be related to folding mode. E.g. I reproduce it easily with CtagsSideKick folding mode, but when no folding mode is used, I can't. ---------------------------------------------------------------------- Comment By: Shlomy Reinstein (shlomy) Date: 2007-08-24 04:27 Message: Logged In: YES user_id=1477607 Originator: NO Wow, for those interested, it seems this very example makes it easy to reproduce the text area corruption bug. If you type this text in a new buffer, then save it in a file with ".cpp" extension, and then use the jEdit menu to open the modes in the FSB, the text area will get corrupted and remain corrupted even as buffers are switched. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100588&aid=1780785&group_id=588 |