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

Press QKeySequence::MoveToStartOfLine, go to the first non-blank character #774

Closed
andreaemonti opened this issue Feb 17, 2021 · 2 comments · Fixed by #1310 · May be fixed by cpeditor/QCodeEditor#41
Closed

Press QKeySequence::MoveToStartOfLine, go to the first non-blank character #774

andreaemonti opened this issue Feb 17, 2021 · 2 comments · Fixed by #1310 · May be fixed by cpeditor/QCodeEditor#41
Labels
enhancement New feature or request medium_priority Medium Priority Issues
Milestone

Comments

@andreaemonti
Copy link

When you press the home-key, the cursor would move at the beginning of the line, but AFTER the indentation tabs/spaces.

I know, I am asking again for a feature from geany, but I am so used to it, that I can't help making mistakes as if it worked the same in CPeditor. Maybe it's just me used to it, but if it is easy to implement, I think it would be a little nice feature for everyone (maybe flaggable in settings > code edit).
Thank you.

@andreaemonti andreaemonti added the enhancement New feature or request label Feb 17, 2021
@ouuan ouuan added the medium_priority Medium Priority Issues label Feb 18, 2021
@ouuan ouuan changed the title Smart home-key Press home key, go to after the indentation Feb 18, 2021
@ouuan ouuan changed the title Press home key, go to after the indentation Press QKeySequence::MoveToStartOfLine, go to after the indentation Feb 19, 2021
@coder3101
Copy link
Member

Overriding home KeyPress event in QCodeEditor to move to first non-white character should do the job.

@ouuan
Copy link
Member

ouuan commented Feb 28, 2021

Overriding home KeyPress event in QCodeEditor to move to first non-white character should do the job.

As stated in the modified title, we should use QKeySequence::MoveToStartOfLine because it's not Home on macOS.

@ouuan ouuan changed the title Press QKeySequence::MoveToStartOfLine, go to after the indentation Press QKeySequence::MoveToStartOfLine, go to the first non-blank character Feb 28, 2021
@sonulohani sonulohani assigned sonulohani and unassigned sonulohani Mar 18, 2021
@sonulohani sonulohani self-assigned this May 8, 2021
@coder3101 coder3101 linked a pull request Jul 14, 2021 that will close this issue
32 tasks
@coder3101 coder3101 added this to the v7.0 milestone Jul 14, 2021
@coder3101 coder3101 added this to To do in CP Editor 7.0 Jul 14, 2021
@coder3101 coder3101 moved this from To do to In progress in CP Editor 7.0 Jul 14, 2021
ouuan added a commit that referenced this issue Feb 20, 2023
ouuan added a commit that referenced this issue Feb 13, 2024
ouuan added a commit that referenced this issue Feb 13, 2024
…avior (#1310)

* fix(CodeEditor): add ESC to cancel selection

cpeditor/QCodeEditor#35

* fix(CodeEditor): MoveToStartOfLine and MoveToEndOfLine behaviors

Ported from cpeditor/QCodeEditor#41

It fixes #774 and replaces #1149.

* docs: update changelog
CP Editor 7.0 automation moved this from In progress to Done Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment