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

Editor contents disappear after removing field from the Outline View #944

Closed
mauromol opened this issue Aug 22, 2019 · 4 comments
Closed
Assignees
Labels
Milestone

Comments

@mauromol
Copy link

mauromol commented Aug 22, 2019

Consider the example in #943.

From the Outline View select foobar, press Del key and confirm. In this case, the Outline View is updated. However now try to click inside the open editor for class Test54: the whole editor contents will disappear, showing just line numbers:

immagine

@mauromol
Copy link
Author

mauromol commented Aug 22, 2019

Please note that I can reproduce this often, but not always. In general what I see is that after the above action on the foobar field, the editor seems to be "redrawn" badly, like if the underlying model is not in synch with actual contents. For instance, the vertical ruler on the left might show 10 lines while the file has just 9 lines and you can't put the cursor on line 10 (it's not even an empty line), or vice versa, showing contents for 10 lines and having the vertical ruler count lines up to 9.

@eric-milles
Copy link
Member

This comes down to setting the proper source offsets on the JDT AST nodes. The end offset is intruding into the line delimiter "\r\n". When this gets cut in half, the editor has problems with a bare "\r".

@eric-milles
Copy link
Member

ready to test

@mauromol
Copy link
Author

Works fine in 3.5.0.v201908272143-e1906, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants