Bug 279084 - Incorrect code folding in simple ruby statements
Summary: Incorrect code folding in simple ruby statements
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: folding (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-01 20:45 UTC by Miquel Sabaté
Modified: 2011-08-02 19:07 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
And this image is from Kate's lastest version (git). (38.06 KB, image/png)
2011-08-01 20:47 UTC, Miquel Sabaté
Details
Old kate version. (48.90 KB, image/png)
2011-08-01 20:49 UTC, Miquel Sabaté
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miquel Sabaté 2011-08-01 20:45:59 UTC
Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

This bug appears with the new KateCodeFolding. If you're writing some Ruby code, you'll notice incorrect code folding in cases such as if-else statements, or begin statements, etc. I cannot reproduce this bug using older versions of Kate. I'll attach two images showing the difference between older Kate versions and  one with the new Code Folding engine (git master).

Reproducible: Always

Steps to Reproduce:
Just write some ruby code.

Actual Results:  
Incorrect code folding.

Expected Results:  
A valid code folding as it was in older Kate versions.
Comment 1 Miquel Sabaté 2011-08-01 20:47:48 UTC
Created attachment 62441 [details]
And this image is from Kate's lastest version (git).
Comment 2 Miquel Sabaté 2011-08-01 20:49:29 UTC
Created attachment 62442 [details]
Old kate version.
Comment 3 Adrian 2011-08-02 11:32:01 UTC
It's look like Ruby's folding it's a little different (there are keywords, not special characters (like C) or tabs (like Python). I found the issue and will I am working to find a solution now. I hope that at the end of the day this will be solved.

Adrian
Comment 4 Adrian 2011-08-02 19:07:35 UTC
Git commit b6052e4b8e5b7910ced8c31977a30a14de861961 by Adrian Lungu.
Committed on 02/08/2011 at 21:03.
Pushed by lungu into branch 'master'.

BUG: 279084

Problem: Ruby uses keywords to define folding blocks. This keywords
act a little different then special characters used in C.
Solution: m_virtualColumn was introduced for the startNodes

M  +10   -4    part/syntax/katecodefolding.h
M  +68   -14   part/syntax/katecodefolding.cpp

http://commits.kde.org/kate/b6052e4b8e5b7910ced8c31977a30a14de861961