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

home_and_end_beginning_end_of_doc=false doesn't affect shift+home and shift+end #4389

Open
beargun opened this issue Jan 5, 2016 · 4 comments
Labels
Component: IDE user interface The Arduino IDE's user interface feature request A request to make an enhancement (not a bug fix) Type: Bug

Comments

@beargun
Copy link

beargun commented Jan 5, 2016

The preferences.txt setting home_and_end_beginning_end_of_doc=false doesn't affect shift+home and shift+end.

end will go to the end of the current line, like expected. However also pressing the shift modifier doesn't select everything from the current cursor to the end of the line, but to the end of the document. Idem for home.

This affect only OSX.

@matthijskooijman
Copy link
Collaborator

matthijskooijman commented Jan 6, 2016

I just tested this on Linux, and indeed it works as expected there (though the preference referenced does not actually change anything there, which is a bit unexpected in itself). Looking at the code, the relevant bit of code is here. The defaults from RSyntaxTextArea that are being overriden here can be found here

So basically, by default in RSTA home/end go to the beginning of the document on OSX and the beginning of the line everywhere else. Arduino overrides this (with the default home_and_end_beginning_end_of_doc=false) and lets OSX also go to the begining of the line (but allows switching back to the original behaviour by setting that preference to true). This Arduino-override forgets to also override shift+home/end. which is the subject of this issue.

I suspect that this would be improved by:

  • Also remapping shift+home/end in the Arduino override
  • Moving the Arduino override code out of the OSX if, so it applies to all platforms equally
  • Add an explicit else, to map (shift+)home/end to jump to the begin/end of the document when the preference is true.

This will mean that Arduino has the same behaviour across all platforms. Alternatively, we could decide to stick to OSX conventions and have different defaults on macosx, but even then it would be good to make this difference in the default preferences, not the code I think. Also note that this used to be the case, but it was changed by #3715 to default to begin/end of line on all platforms.

@cmaglie cmaglie added feature request A request to make an enhancement (not a bug fix) Type: Bug Component: IDE user interface The Arduino IDE's user interface labels Jan 12, 2016
@ghost
Copy link

ghost commented Aug 28, 2016

It happens exactly the same to me.

@nobias
Copy link

nobias commented Sep 21, 2017

+1. This inconsistency is quite annoying...

@tomstorey
Copy link

Is there any movement on fixing this? It is very irritating, to the point I am looking at other IDEs to do my development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE user interface The Arduino IDE's user interface feature request A request to make an enhancement (not a bug fix) Type: Bug
Projects
None yet
Development

No branches or pull requests

5 participants