You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Selecting a line from the gutter causes the view to scroll #6722
Selecting a line from the gutter causes the view to scroll
When a line is selected from the gutter near enough to the end of the view, the view unwantedly scrolls up some lines.
This also happens when the line is selected in the upper part of the view, when the user selects either the first or the second visible line. This behaviour can lead to multiline selection in some cases and when the user modifies the text in a destructive way (e.g. deletion or replacement) it can lead to errors.
Repro Steps
Open a file that does not fit in the view
Select the first or last fully visible line by clicking on the line number
Expected: The line is selected and the view does not scroll Actual: The view scrolls up or down respectively when selecting the last line or the first line
Yes, in safe mode it's much the same thing. I'm on a different workstation now with almost the same configuration. The behaviour is identical. I'll also try to verify it on a Windows machine ASAP, in safe mode.
Please tell me if there is more I can do to help locate the problem, in case you cannot reproduce it.
You should see the same auto-scrolling behavior when you click within the last few lines (not in the gutter). Do you see that behavior and do you think that behavior is problematic as well (and if not -- why not)? The gutter-click is causing the view to auto-scroll as well because that action places the cursor on that line you clicked (try clicking on the gutter and then pressing the right arrow).
You said:
This behaviour can lead to multiline selection in some cases and when the user modifies the text in a destructive way (e.g. deletion or replacement) it can lead to errors.
Can you try describing at least one specific case where this can cause errors (in as many details as possible) and share a GIF which demonstrates that? I think that would be very helpful for explaining why the current behavior is problematic.
I don't know whether or not it could be merged with this one. #6675
That report sounds a bit different -- it points out a specific case where auto-scrolling is problematic, not that auto-scrolling is problematic is general.
In fact when you click in a part of the editor near the top or the bottom to put the cursor there, the view scrolls enough moving the line containing the cursor towards the center of the screen. Indeed, like it or not (I actually like it when not selecting a line), this is easily recognizable as a feature.
I'll try to reproduce this on a GIF when I'll have a screencast recorder on this workstation (hopefully soon!), but the annoying point is when one inadvertently clicks to select a line and multiple lines are selected. I think that in order to have multiple lines selected the mouse has to be slightly moved, but the movement can also be "imperceptible" or unwanted. I'm quite used to old editors that sported the gutter as a means to select one or more lines, as Atom does, and it wasn't uncommon for me to select a whole line and overwrite (by writing other code) or just delete it. In this case I have to pay some more attention to how the editor behaves - or change my behaviour, which wouldn't be overkill considering that most programming environments already forced me to get used to something different each time in the past. :-)
However as soon as I have a screencast at hand, I'll post it. Also, if it happens again (because it happened at least until 0.197) that also selecting a whole line from the gutter more towards the center of the view causes such scrolling, I'll document it as well.
Thank you for answering so quickly, @izuzak (and @nathansobo as suggested)!
@izuzak and @nathansobo, here is an example of what is reproducible: I click a line near the bottom, inadvertently move the mouse slightly, and start to code overwriting without thinking too much. I lose some lines instead of one. Sometimes it happens (although I try to avoid it now, really!):
Well, I've stretched it a bit, but sometimes I might have lost three or four lines of code and had to repeatedly Undo to recover it. After some time spent on the editor it happens quite often, that's why I tried to change my habits first instead of raising an issue.
[EDIT] Also, as I said above, it's possible to reproduce an erratic behaviour that can be more confusing, either selecting a single line or selecting multiple lines from the gutter (be it intentional or not): clicking on a line number as shown in the screencast causes the view to scroll. This only happens when the panes are split. In my case, to reproduce:
Open a long enough file
Split the pane right and then split the rightmost pane down
In the upper right pane (not just it, but for reference) scroll to the end of file
Position the cursor on the last line
Click on a line number just around the center of the view.
This was taken in safe mode, in order to avoid any interferences. Now I'd better give up with these screenies, or I'll be kicked away from Github before I even begin to enjoy it.
Same problem here. This is a big kink in my workflow. I can't click and drag along to select multiple lines like other editors. Wasting so much time with manual selections. Is there a way to turn off this click on scroll?
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
almostearthling commentedon May 10, 2015
I don't know whether or not it could be merged with this one.
#6675
F.
winstliu commentedon May 11, 2015
@almostearthling can you reproduce this in safe mode (
atom --safe)?almostearthling commentedon May 11, 2015
Yes, in safe mode it's much the same thing. I'm on a different workstation now with almost the same configuration. The behaviour is identical. I'll also try to verify it on a Windows machine ASAP, in safe mode.
Please tell me if there is more I can do to help locate the problem, in case you cannot reproduce it.
F.
izuzak commentedon May 11, 2015
Thanks for the detailed feedback, @almostearthling.
You should see the same auto-scrolling behavior when you click within the last few lines (not in the gutter). Do you see that behavior and do you think that behavior is problematic as well (and if not -- why not)? The gutter-click is causing the view to auto-scroll as well because that action places the cursor on that line you clicked (try clicking on the gutter and then pressing the right arrow).
You said:
Can you try describing at least one specific case where this can cause errors (in as many details as possible) and share a GIF which demonstrates that? I think that would be very helpful for explaining why the current behavior is problematic.
That report sounds a bit different -- it points out a specific case where auto-scrolling is problematic, not that auto-scrolling is problematic is general.
Also cc @nathansobo for more 💭.
almostearthling commentedon May 11, 2015
In fact when you click in a part of the editor near the top or the bottom to put the cursor there, the view scrolls enough moving the line containing the cursor towards the center of the screen. Indeed, like it or not (I actually like it when not selecting a line), this is easily recognizable as a feature.
I'll try to reproduce this on a GIF when I'll have a screencast recorder on this workstation (hopefully soon!), but the annoying point is when one inadvertently clicks to select a line and multiple lines are selected. I think that in order to have multiple lines selected the mouse has to be slightly moved, but the movement can also be "imperceptible" or unwanted. I'm quite used to old editors that sported the gutter as a means to select one or more lines, as Atom does, and it wasn't uncommon for me to select a whole line and overwrite (by writing other code) or just delete it. In this case I have to pay some more attention to how the editor behaves - or change my behaviour, which wouldn't be overkill considering that most programming environments already forced me to get used to something different each time in the past. :-)
However as soon as I have a screencast at hand, I'll post it. Also, if it happens again (because it happened at least until 0.197) that also selecting a whole line from the gutter more towards the center of the view causes such scrolling, I'll document it as well.
Thank you for answering so quickly, @izuzak (and @nathansobo as suggested)!
F.
almostearthling commentedon May 11, 2015
@izuzak and @nathansobo, here is an example of what is reproducible: I click a line near the bottom, inadvertently move the mouse slightly, and start to code overwriting without thinking too much. I lose some lines instead of one. Sometimes it happens (although I try to avoid it now, really!):
Well, I've stretched it a bit, but sometimes I might have lost three or four lines of code and had to repeatedly Undo to recover it. After some time spent on the editor it happens quite often, that's why I tried to change my habits first instead of raising an issue.
[EDIT] Also, as I said above, it's possible to reproduce an erratic behaviour that can be more confusing, either selecting a single line or selecting multiple lines from the gutter (be it intentional or not): clicking on a line number as shown in the screencast causes the view to scroll. This only happens when the panes are split. In my case, to reproduce:
This was taken in safe mode, in order to avoid any interferences. Now I'd better give up with these screenies, or I'll be kicked away from Github before I even begin to enjoy it.
F.
parlayvu commentedon Jun 4, 2015
Same problem here. This is a big kink in my workflow. I can't click and drag along to select multiple lines like other editors. Wasting so much time with manual selections. Is there a way to turn off this click on scroll?
Mac 10.9.5
v0.205.0
lock commentedon Jan 20, 2019
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!