https://bugs.kde.org/show_bug.cgi?id=457551

            Bug ID: 457551
           Summary: Text folding is broken for multi-line comments with
                    exactly two lines.
           Product: frameworks-syntax-highlighting
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: framework
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: sommer...@gmail.com
  Target Milestone: ---

SUMMARY

Text folding is broken for multi-line comments with exactly two lines.


STEPS TO REPRODUCE
1. Open one of the attached minimal examples.
2. Hover the mouse over the folding indicator of the two-line comment.
3. Do a left-click.

OBSERVED RESULT
When hovering the mouse over the folding indicator of the tow-line comment, not
only the comment itself is selected, but the whole surrounding block. When
doing the left-click, this whole block is folded.

EXPECTED RESULT
It seems that for text folding, the syntax highlighting engine always keeps the
first and the last line visible (which is a reasonable behaviour, given that
apart from the hidden text, there might be more content on these lines that is
not part of the comment and should therefore not be hidden). Given this policy,
the correct behaviour for two-line comments would be to not show the folding
indicator at all - just as it does currently also for multi-line comments with
only one single line.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-43-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-7700HQ CPU @ 2.80GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 630

ADDITIONAL INFORMATION
This seems to be a general problem of the text folding implementation. It
occurs across various languages and seems therefore be independent of the
individual syntax files (.xml files).

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to