-
Notifications
You must be signed in to change notification settings - Fork 0
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] Select Line + Move Line Up = Line disappears at top of editor #4809
Comments
|
Also, I wonder whether this is a regression. |
|
Make sure you are using Select Line to select the line. If you select the line using clicking and dragging, or using shortcut selection keys, you won't be able to reproduce the problem. Also, make sure line 1 is not visible at the top when you select the line. Line 1 should be scrolled upwards off the editor screen. As soon as you move the line up to the top of the editor window, the selected line should move past the top border of the editor window. |
Yes, I can see the issue now, the problem is with the scroll not scrolling enough to show the line. I can easily reproduce with this steps in windows in a document where you can scroll
Result: The scroll doesn't show the selected line. It seems an issue with line selection and not move line. You can see the problem by moving the cursor out of view and then pressing Ctrl+L. If the cursor is above the first visible line, you don't partially see the selected line, if it is below the last visible one, you can see the selected line and the following one. It seems that CM scrolls using the cursor as if it was in the next line, in the same way as if you use Shift+Down when the cursor is out of view. |
I think that there might be an issue to fix in CM in the way it handles line selections. |
Sounds plausible. I'll nominate this for 1.0 since it seems like the kind of thing that, while not necessarily common, would be very annoying if I ran into it. |
I think the issue here is that CM uses the cursor at the end of the selection to scroll the page and since when we highlight one line, that cursor is actually on the character 0 of the next line, it scrolls so that that line is in view, but the highlighted line isn't. |
Yup, that's kind of what I was assuming was going on. (It might be that he uses the head of the selection, rather than the end of it specifically, but the head is usually the end.) It seems instead like it should try to scroll the whole selection into view, but if the selection is bigger than the visible viewport, prefer to keep the head end on screen. |
The issue can be reproduced here: http://codemirror.net/demo/sublime.html The only difference is that you can see the mouse, but it looks like there is no selection at all. |
Ah, cool. I'd suggest filing a bug with Marijn on that, since it's easy to reproduce in vanilla CM, but point out that it's a more general issue with scrolling, not just the ST functionality. |
Marking "last reviewed" as the last of the 1.0 bugs we've reviewed so far. |
The main difference is that, in this bug, you have to specifically use Select Line (Ctrl+L) before this bug will repro. You can tell the difference because the select highlight extends all the way to the right edge of the editor. If you just put the cursor on a line with no selection, or partial line selection, and move the line up, you won't see this issue. You will, however, continue to see issue #7458. |
|
Oh, good catch -- I missed step 2 in the repro here. |
|
|
Cool, thanks. |
Fix submitted. |
Confirmed. Closing. |
Monday Sep 16, 2013 at 18:19 GMT
Originally opened as adobe/brackets#5226
OS: Windows 7
Brackets Build: sprint 31 development build 0.31.0-0 (master ad9a60318)
Repro Steps:
Observed Results:
Selected line disappears beyond the top edge of the editor.
Expected Results:
Selected line should be visible on the top line of the editor.
Other notes:
You can also repro this with the Move Line Down as well. Selected line stays one line above the bottom line of the editor instead of going to the bottom line.
The text was updated successfully, but these errors were encountered: