Bug 327842 - cstyle.js indenter: End of C-style comment is misdetected
Summary: cstyle.js indenter: End of C-style comment is misdetected
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: indentation (show other bugs)
Version: Git
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-19 23:45 UTC by Rolf Eike Beer
Modified: 2015-10-07 10:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: KDE Frameworks 5.16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Eike Beer 2013-11-19 23:45:24 UTC
Type this in a C or C++ source file:

char *buf;
int i;
/* foo
 * bar */
*buf = 0;

If you now press return after the last semicolon the next line will begin with '*' as if it still is in comment mode.

Now remove that * and type "i = 0;". Now mark all 4 lines and paste them somewhere: the last line will be prepended with a * again, as the following line is.


Reproducible: Always
Comment 1 Kevin Funk 2013-11-20 00:02:45 UTC
Confirmed.
Comment 2 Kevin Funk 2013-11-20 00:05:01 UTC
This is a Kate issue, however. Moving to Kate component.
Comment 3 Alex Turbov 2014-04-18 13:31:04 UTC
can't reproduce w/ both C (version 1.45) and C++ (version 2.1) highlighter...
feel free to reopen if the still here....
Comment 4 Rolf Eike Beer 2014-04-18 13:35:04 UTC
At least in 4.12.4 it is still present in both Kate and KDevelop (4.6.0).
Comment 5 Alex Turbov 2014-04-18 13:39:39 UTC
try to update syntax XML files... it is not a problem of kate's binary code, but an individual highlighting definition file, which is separate XML and can be updated via Settings -> Configure Kate... -> Open/Save -> Modes&File types tab -> Download Highlighting Styles...
Comment 6 Rolf Eike Beer 2014-04-18 13:44:56 UTC
> try to update syntax XML files... it is not a problem of kate's binary code,
> but an individual highlighting definition file, which is separate XML and
> can be updated via Settings -> Configure Kate... -> Open/Save -> Modes&File
> types tab -> Download Highlighting Styles...

According to what is shown there I already had C 1.45 and C++ 1.50 installed.
Comment 7 Alex Turbov 2014-04-18 13:51:02 UTC
oops, sorry I've misunderstood the bug reason...
the problem is in C indenter actually.
and unfortunately it still here...
Comment 8 Dominik Haumann 2015-10-07 10:08:24 UTC
Git commit e13b3c6dd09e082dc8331ca04b81f02bbd303db1 by Dominik Haumann.
Committed on 07/10/2015 at 10:08.
Pushed by dhaumann into branch 'master'.

End of C-style comment is misdetected
CHANGELOG: fixed bug #327842: End of C-style comment is misdetected

A  +4    -0    autotests/input/indent/cstyle/doxygen10/expected
A  +3    -0    autotests/input/indent/cstyle/doxygen10/input.js
A  +3    -0    autotests/input/indent/cstyle/doxygen10/origin
M  +4    -2    src/script/data/indentation/cstyle.js

http://commits.kde.org/ktexteditor/e13b3c6dd09e082dc8331ca04b81f02bbd303db1