Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab replacement not working correct sometimes when folding enabled #62

Open
cszabo2 opened this issue May 10, 2019 · 5 comments
Open

Tab replacement not working correct sometimes when folding enabled #62

cszabo2 opened this issue May 10, 2019 · 5 comments
Labels
bug Something isn't working

Comments

@cszabo2
Copy link

cszabo2 commented May 10, 2019

This is a hard to reproduce issue, but when it happens it is very annoying.
I have a relatively large (2500 lines) yaml file with long multi-line strings with | and > start chars also double quotes.
I installed the yaml editor (restarted Eclipse), then turned on right margin display at 109 chars, set tab sizes to 4 chars, YamlEditors right margin to 109 chars, enabled view whitespace in the general editor.
When I did this at first and started to edit the file my insertion point would automatically jump to the end of the file after every Tab press. This happened consistently even after I undid all the settings above, until I closed the file. I tried to make a reduced case by creating a new yaml file to show the problem but was unable to reproduce the problem. I have closed and reopened the file I was originally working on but I was unable to reproduce the problem even after reenabling all the features that may have caused a problem before (BTW this is an Eclipse set up for C++ development not Java, with PyDev and yaml Editor plug-ins added).
I filed this issue in an attempt to help find and fix this if others see it and also record the work around (close and reopen the file) in case somebody else sees the same issue.

@cszabo2
Copy link
Author

cszabo2 commented May 11, 2019

I found a way to reproduce the issue reliably. Rename the attached file to test.yaml
Open it up in Eclipse.
In the Outline view Expand V1, Expand V2, select V6.
On the left bar collapse cppDoc
Click on line 47 and type Tab. The cursor will jump a few lines lowere.
test.txt

@cszabo2
Copy link
Author

cszabo2 commented May 11, 2019

Apparently the problem appears every time a section of the yaml file is collapsed by clicking the handles on the right of the editor.

@de-jcup
Copy link
Owner

de-jcup commented May 11, 2019

Hello @cszabo2
image

when pressing just an a it looks like following:
image

doing same action with a TAB instead of pressing aon same position leads to:
image

Doing same operations in unfolded state or in disabled folding this kind of behaviour does not appear.
So it does only appear with folding.

@de-jcup
Copy link
Owner

de-jcup commented May 11, 2019

root:
  A:
    av1:'av1'
    av2:'av2'
    av2:'av3'

  B:
    bv1:'bv1'
    bv2:'bv2'
    bv3:'bv3'

Brings up same problem with tab and enabled folding:
image

image

Also it does not appear when folding is disabled. Also when Collapse all folding triggered, all is working again.

So this is a bug between tab replacement apprach and folding feature...

@de-jcup de-jcup added the bug Something isn't working label May 11, 2019
@de-jcup
Copy link
Owner

de-jcup commented May 11, 2019

@cszabo2 : I am currently very busy and also concentrating on next bash editor release. So I have no idea when this bug will be fixed - sorry. (Also I am worried the fix will not be easy)

But in the meantime as a workaround you can do following:

  • Do not use folding (uncheck "New opened editors have code folding enabled" in preferences)
    and use quick outline (CTRL+ o) or normal outline as a replacement to find the corresponding parts
  • Or use folding but just do not use tab key any more

de-jcup added a commit that referenced this issue May 11, 2019
@de-jcup de-jcup changed the title Sometimes tabs do not work in the middle of the file Tab replacement not working correct sometimes when folding enabled May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants