Bug 559852 - Code folding failures
Summary: Code folding failures
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.7.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-04 23:04 EST by Jason Roderick CLA
Modified: 2020-05-10 16:29 EDT (History)
4 users (show)

See Also:


Attachments
animated gif of failure (38.73 KB, image/gif)
2020-02-06 12:22 EST, Jonah Graham CLA
no flags Details
void (96.06 KB, image/gif)
2020-02-08 09:46 EST, Jason Roderick CLA
no flags Details
enter (562.89 KB, image/gif)
2020-02-08 09:48 EST, Jason Roderick CLA
no flags Details
void (487.58 KB, image/gif)
2020-02-08 09:56 EST, Jason Roderick CLA
no flags Details
enter (3.05 MB, image/gif)
2020-02-08 09:57 EST, Jason Roderick CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Roderick CLA 2020-02-04 23:04:23 EST
Eclipse IDE for C/C++ Developers
Version: Oxygen.3a Release (4.7.3a)
Build id: 20180405-1200
I am running Ubuntu Linux 19.10

PROBLEMS WITH CODE FOLDING: The folds are constantly opening by themselves.

1.) Editing the line of a folded section makes them open by themselves.

2.) Pressing ENTER on a line that is folded makes the fold open.
	 I do this to move the folded line down to space them out.

3.) Pressing ENTER on the line above can make the fold below open.

4.) Pressing ENTER on any line can make folds below that point open by themselves.

5.) The cross symbols indicating the fold is closed displays sometimes when it is not.

6.) The dash symbol indicating the fold is open displays sometimes when it is not.

7.) Sometimes the symbol is missing entirely.

8.) Sometimes the code is folded , and there is no symbol to open it ,
    and i cant get to my code at all! Even a restart does not fix it.

9.) While trying to close all the self-openeing folds , the code preview open
    every time and covers the code I want to close.


This is the solution I would like to see is:

1.) No fold ever opens unless I click the cross button.
2.) No fold ever closes unless I click the dash button.
3.) Hovering on the button never spams the folded code preview.
4.) Pressing ENTER on the line with the cross does NOT open the fold.
5.) Pressing ENTER on the line above the cross does NOT open the fold.
6.) Pressing ENTER on the line below the cross does NOT open the fold.
7.) Editing the line with the cross does NOT open the fold.

And another strange thing... The symbol at the end of the folded line,
( which looks like a outlined space character with two dots at the bottom. )
which is what actually what I thought was supposed to be the code preview, gets
moved down a line , like a newline was put before it. It appears alone on a line
below the folded code section. And it does not do anything at all when I hover over it.

This bug is making me bald. 8)
Comment 1 Jonah Graham CLA 2020-02-06 12:22:33 EST
Created attachment 281722 [details]
animated gif of failure
Comment 2 Jonah Graham CLA 2020-02-06 12:25:38 EST
Hi Jason, Thank you for the bug report against CDT. 

Hi Platform folk, I am moving this bug report to the Eclipse Platform project as I believe these are all common issues affecting many editors in Eclipse.

I have attached an animated gif showing one of the bigger problems, when a code block can't be expanded. In the gif I am using Java. and when I introduce and remove a syntax error, the code folding is left in a broken state.
Comment 3 Andrey Loskutov CLA 2020-02-06 12:36:45 EST
Any errors in the log?
Comment 4 Jonah Graham CLA 2020-02-06 12:39:40 EST
(In reply to Andrey Loskutov from comment #3)
> Any errors in the log?

No.
Comment 5 Jason Roderick CLA 2020-02-07 12:04:46 EST
I looked at attachment 281772 [details] , and I have never encountered that problem.
My problems seem to be different.  What are you using to make one
of those animated .gif images? I could try to get examples of what I
am seeing here in the same fassion.  I am running on Ubuntu 19.10.
Comment 6 Jonah Graham CLA 2020-02-07 12:07:29 EST
I am running 18.04 and I used peek to make gifs.

https://github.com/phw/peek

If it turns out that the case you have is Cat specific I will split the bug up.
Comment 7 Jonah Graham CLA 2020-02-07 12:08:38 EST
(In reply to Jonah Graham from comment #6)
>... Cat specific... 

*CDT specific
Comment 8 Jason Roderick CLA 2020-02-08 09:46:47 EST
Created attachment 281753 [details]
void

when creating a new function , typing is swallowed by next existing function.
Comment 9 Jason Roderick CLA 2020-02-08 09:48:38 EST
Created attachment 281754 [details]
enter

When I press enter , everything opens.
Comment 10 Jason Roderick CLA 2020-02-08 09:49:26 EST
Thanks for the pointer to peek , that is a gem of a tool!

Here are two images that show at least 2 examples of what I am 
getting.

The first is called 'void'.  This is where the start of my function
gets swallowed up for some reason. I do not press anything on the keyboard
but void and a space , I do not press enter here.

The second is called 'enter' and is what happens when I make an edit and
press enter. It expands everything.  I have to go back and close everything
in the file every time I press enter on anything. That includes cut and paste
as well.

Both examples are after a restart.
Comment 11 Jason Roderick CLA 2020-02-08 09:56:13 EST
Created attachment 281755 [details]
void

updated .gif.
Comment 12 Jason Roderick CLA 2020-02-08 09:57:41 EST
Created attachment 281756 [details]
enter

updated .gif.
Comment 13 Jason Roderick CLA 2020-05-10 15:23:10 EDT
Can someone please tell me what is causing this problem , or , what I can turn off to make it stop.  I just cant work like this anymore.
Comment 14 Jonah Graham CLA 2020-05-10 16:29:21 EDT
Hi Jason, I am sorry this is causing you problems with your workflow. I don't know what the underlying problem is or how to workaround it, other than just not folding code in the first place.