Repository navigation
Code folding artifacts in some cases (repeated fold line) #16078
Description
Edit by @rsese to clean up issue body and add latest details
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- [Reproduced after resetting to factory defaults but in safe mode since repro steps require a community package] Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
There have been a number of reports of duplicated code fold lines since around Atom 1.21.2 but with some trouble coming up with specific steps to reproduce (e.g. no specific common community packages though a couple of folks mentioned it happened commonly for them in large files).
In #16078 (comment) we did get specific reproduction steps though.
Steps to Reproduce
via elpollodiablo84/language-matlab-plus#1 (comment) h/t @elpollodiablo84 (I couldn't reproduce with other packages installed so ended up temporarily resetting to factory defaults first):
apm install language-matlab-plus- Save and open https://github.com/elpollodiablo84/language-matlab-plus/blob/ffba8d71775e392b68882876bd877fb8f78206f8/test/test2.m
atom test2.m- Fold the function
new_fun - Fold the function
secondaryFunction. - Unfold
secondaryFunction
Expected behavior: [What you expect to happen]
secondaryFunction function unfolds with no effect on the folded new_fun function.
Actual behavior: [What actually happens]
The first line of the folded new_fun will duplicate each time you fold/unfold secondaryFunction.
GIF-age:
Reproduces how often: [What percentage of the time does it reproduce?]
100%
Versions
Atom 1.30.0 and 1.32.0-nightly11.
macOS 10.12.6
Additional Information
Additional comments from elpollodiablo84/language-matlab-plus#1 (comment) related to language-matlab-plus:
The issue disappears in the following cases:
- Disabling the decoration of persistent variables, commenting the line in
../lib/main.js:
editor.decorateMarker(marker, {type: 'text', class: 'variable-persistent'});- Changing the type of the decoration in the previous line (Ex:
highlightorline).- Disabling the function scope check , commenting
functionNames.includes(v[0])out of itsifblock.
Edited by @rsese to consolidate description in the issue body
Atom Version 1.21.2 latest
Mac Sierra 10.12.6, NVIDIA GeForce GT 750M 2048 MB, 2.5 GHz Intel Core i7, 16 GB 1600 MHz DDR3
Does not reproduce in safe mode (no linting)
Atom Core (editor)
intermittent behavior
If I Show Invisibles I cannot reproduce. It seems to be a specific file. I cannot find any invisible item.
if you fold all functions, if you make an error typing functions show up multiple times on the same line.
i.e. someFunc(){ = someFunc(){ = someFunc() { = where = is the marker that the function is folded
This time it occurred by simply flicking the scroll up and down quickly. Mac, magic mouse.
I seems to be a redraw issue. If you scroll to where all of the folded functions are out of view, when scrolling them back into view they return to normal.
This is difficult to reproduce. I am linting and sometimes if I add a space after a }, wait for it to lint and error, then backspace and remove the space it will happen. It is very intermittent. Latest version of atom, editing react javascript jsx files, with linting.



Activity
rsese commentedon Nov 2, 2017
Thanks for reaching out!
Can you update the issue body to use the issue template? The information is super helpful and gives us a lot of basic information to help us investigate e.g. it asks what version of Atom you're running, what operating system + version you're running, does the behavior reproduce in safe mode, what are the exact steps to reproduce the behavior (as much detail as possible in the repro steps would be great), etc.
A screencast/GIF of the behavior could be helpful too.
We require the template to be filled out on all new issues and pull requests so if you can open a new issue with the template filled out, that would be helpful for us. We do this so that we can be certain we have all the information we need to address your submission efficiently. This allows the maintainers to spend more time fixing bugs, implementing enhancements, and reviewing and merging pull requests.
Thanks for understanding and meeting us half way 😀
pbarbiero commentedon Jan 2, 2018
I have also experienced this in the last couple atom versions. I didnt report it because I thought it to be a duplicate of #16289 but it clearly is not.
Currently reproducing on Atom 1.23.1 x64 in Windows 10, although its rare and difficult.
Its possible it could be related to other addons however, such as linter-ui and/or atom-prettier.
pbarbiero commentedon Feb 12, 2018
@BountifulClutter I get this without using
linter-csslint 2.0.0-- I think this should be reopened.12 remaining items
rsese commentedon Sep 14, 2018
Thanks @elpollodiablo84 - with the repro steps in elpollodiablo84/language-matlab-plus#1 (comment) on macOS 10.12.6 and
language-matlab-plusas the only installed community package, I can reproduce the duplicated folds. Can also reproduce on 1.32.0-nightly9.I'll update the issue body with these details.
[-]Code Folding[/-][+]Code folding artifacts in some cases (repeated fold line)[/+]nathansobo commentedon Apr 18, 2019
@rsese Just wanted to note that @Ben3eeE reached out to me about this one. I'd like to evaluate prioritizing it in our next meeting.
rsese commentedon Apr 19, 2019
Added for discussion 👍
doutatsu commentedon Feb 4, 2021
Is there any progress on this bug? I've been seeing this issue for over a year now...