-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
rulers + lineWrapping = unnecessary scrollbar #4042
Comments
I think attached patch will help. |
Hi @marijnh, After applying this patch the ruler got shifted and now it strikes a letter instead of separating the letters: I've checked with two different setups on Chrome 61.0.3163.100 (Official Build) (64-bit) (latest as of today), on Windows 7 x64. Do you observe the same symptoms? Is it possible to get the ruler back where it was before the patch? |
Here's a patch that reverts the shift. Not sure if it still fixes the original issue of the unnecessary scrollbar though. |
I'm not seeing the shift in http://codemirror.net/demo/rulers.html. What triggers it? |
Concerning the demo page. The layout structure of the http://codemirror.net/demo/rulers.html is slightly different from jupyter-notebook. In jupyter it is and in your demo it is That's why the shift is not visible in the demo page. |
Right, that's why codemirror.css has these comments: .CodeMirror-lines {
padding: 4px 0; /* Vertical padding around content */
}
.CodeMirror pre {
padding: 0 4px; /* Horizontal padding of content */
} I.e. the fact that horizontal padding should be set in |
Emm, by 'you' you mean me as a jupyter developer or me as an end user? I'm afraid I'm the second, not the first :) I was sort of reporting an issue that broke the 'ruler' plugin from working in jupyter-notebook. And I've traced back the problem to the fix of this ticket. What's your suggestion on whom should I address with bugreport? |
I guess filing an issue with Jupyter is appropriate then. |
Repro:
Expected:
Ruler goes off the side of the editor (becoming unreachable), the text is wrapped to be fully visible in the viewport, and no scrollbar appears.
Actual:
A scrollbar appears, but the text is still wrapped to the width of the viewport. If you scroll right, you see a gap with no text in it.
I got it to happen in demo/rulers.html with the following content:
The text was updated successfully, but these errors were encountered: