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

[CLOSED] Disabling word wrap can leave a big blank gap #3012

Open
core-ai-bot opened this issue Aug 29, 2021 · 9 comments
Open

[CLOSED] Disabling word wrap can leave a big blank gap #3012

core-ai-bot opened this issue Aug 29, 2021 · 9 comments

Comments

@core-ai-bot
Copy link
Member

Issue by TomMalbran
Thursday Mar 21, 2013 at 21:32 GMT
Originally opened as adobe/brackets#3206


Problem:

  1. Open a file with long files. I tested with src/thirdparty/CodeMirror2/modes/sql/sql.js.
  2. Scroll to the end of the file.
    3.1. If word wrap is enabled, disable it.
    3.2. If word wrap is disabled, enable it, scroll back to the end of the file and disable it.
  3. Select the last line
  4. Re-enable word wrap

Result:
3. You only see lines 260-269, since those where the lines rendered before, leaving a big gap on the top. Scrolling solves this issue.
5. You can see all the text, but the cursor is not on the screen anymore. Not a big issue, but there seems to be a big scroll difference.

Expected:
3. No blank lines.
5. Scroll stays at the bottom of the screen.

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Thursday Mar 21, 2013 at 21:36 GMT


I believe 3 can be easily fixing by doing a refresh on the current document.

@core-ai-bot
Copy link
Member Author

Comment by pthiess
Friday Mar 22, 2013 at 22:07 GMT


Reviewed@RaymondLim

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Monday Mar 25, 2013 at 16:55 GMT


This has the same root cause as #3241. If I comment out the changes in codemirror/codemirror5@9338ba4, then the rendering issue is fixed, but not the scrolling issue after step 5 which I believe have to fix in our code.

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Tuesday Mar 26, 2013 at 21:45 GMT


The main issue in step 3 is fixed in CM, but I still need to fix the issue in step 5 in my code where we turn Word Wrap on.

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Tuesday Mar 26, 2013 at 23:02 GMT


I checked back into this and both issues seem fixed. The scroll doesn't move at all enabling and disabling the word wrap option. The cursor might get off the screen, but I think that should be expected if it wants to keep the scroll as before. It should be more important to keep the scroll as it was than the cursor in view.

@core-ai-bot
Copy link
Member Author

Comment by njx
Tuesday Mar 26, 2013 at 23:03 GMT


I had to roll back the CM SHA due to the latest upstream breaking our unit tests (see comment in #3241), so let's keep this open for now.

@core-ai-bot
Copy link
Member Author

Comment by njx
Thursday Mar 28, 2013 at 16:57 GMT


FYI, the latest CM is merged again, so that aspect of this should be fixed now.

@core-ai-bot
Copy link
Member Author

Comment by TomMalbran
Thursday Mar 28, 2013 at 21:24 GMT


Yes, I see the problem fixed again.

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Friday Mar 29, 2013 at 03:40 GMT


Closing.

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

No branches or pull requests

1 participant