Bug #165

CodeEditor: incorrect refresh with scope highlighting enabled

Added by Daniel Kos almost 8 years ago. Updated almost 8 years ago.

Status:ApprovedStart date:11/11/2011
Priority:UrgentDue date:
Assignee:Miroslav Fidler% Done:

100%

Category:IDESpent time:-
Target version:-

Description

Steps to reproduce:
1. Enable 2-colors scope highlighting
2. Paste this code into editor and run spaces to tabs

void test()
{
    if(a() && b)
    {
    }
}

3. Place cursor after a():

a()|

4. Start typing )// Code should look like this now:
void test()
{
    if(a())// && b)
    {
    }
}

5. Start pressing backspace 3 times (to remove just inserted chars).
After last backspace scope highlighting should be the same as in the beginning but is corrupted (until full refresh). Please take a look at attached screenshot.

broken_scope_highlighting.png (1.02 KB) Daniel Kos, 11/11/2011 05:10 PM

165_uppsrc.diff Magnifier - The diff file to apply for uppsrc directory (3.18 KB) Sender Ghost, 11/15/2011 06:01 AM

History

#1 Updated by Miroslav Fidler almost 8 years ago

  • Priority changed from Normal to Urgent

#2 Updated by Miroslav Fidler almost 8 years ago

  • Status changed from New to Ready for QA
  • Assignee changed from Miroslav Fidler to Daniel Kos

#3 Updated by Sender Ghost almost 8 years ago

I think, r4170 didn't solve this problem.
Incorrect scope highlighting for following source code:

void test()
{
    if(a()) && b) // <-- incorrect ')' or ']' must be ignored for correct scope highlighting
    {
    }
}

int main()
{
    test();
    return 0;
}

Which lead to attached patch.

#4 Updated by Miroslav Fidler almost 8 years ago

  • Assignee changed from Daniel Kos to Sender Ghost

Sender Ghost wrote:

I think, r4170 didn't solve this problem.
Incorrect scope highlighting for following source code:
[...]
Which lead to attached patch.

It is not the same issue. Original problem is repaint artifact. Whether highlightling process should "fix" incorrect braces is another problem. Personally, I like current behaviour is better, as it visually tells that something is wrong.

Anyway, it is not a problem if you do QA instead of Assigned person. But please, if you think the bug is not resolved, change status to New and assign back to me (or other author). This way, I have missed your patch completely...

Please Approve or assign to Daniel (as issue origin). Or back to me if you think you are right (you might be). I think the proper action now is perhaps adding some "Consider fixing incorrect braces in syntax HL" task, with suggested patch... (we can then negotiate whether it is a good idea at all..).

Mirek

#5 Updated by Sender Ghost almost 8 years ago

  • Assignee changed from Sender Ghost to Miroslav Fidler

#7 Updated by Sender Ghost almost 8 years ago

Personally, I like current behaviour is better, as it visually tells that something is wrong.
It tells with red color on braces.

#8 Updated by Sender Ghost almost 8 years ago

Sender Ghost wrote:

It tells with red color on braces.

with red color on ')' and ']' brackets.

#9 Updated by Daniel Kos almost 8 years ago

  • Status changed from Ready for QA to Approved
  • % Done changed from 0 to 100

Also available in: Atom PDF