question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

C-a (jump to beginning of line)

See original GitHub issue

Dear All, on QtConsole 4.3.0 the command C-a (i.e. Control-a) moves the cursor between the 1st and 2nd characters of a non-empty line. This is in contrast with Emacs, where this command moves the pointer to the very beginning of line. Is this the intention on Qtconsole? Cheers, Temok

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
EhsanKiacommented, Oct 7, 2018

Have some free time this weekend and decided to dig into this issue. I’ll be writing out my findings as I go along here, so even if I don’t find a fix, hopefully it can help anyone looking at this bug in the future.

The best candidate file for where this could be happening is console_widget.py, as it looks to have all methods related to cursor position. More specifically for this bug, I would guess inside QtCore.Qt.Key_Home. From reports, it seems to have broken between 4.2.1 (March 30, 2016) and 4.3.1 (August 12, 2017).

Looking at changes around that time range, these jumped to my attention: Home key event updated (4.3.0) Alternate between start of line and start of text (4.3.0) Home key event updated. (4.3.0) Propertly keep track of prompt position (4.3.0) Restore cursor position move before inserting prompt (4.3.1) Fix _get_leading_spaces to check first line vs. continuation (4.4.0)

The last commit is outside the range, but since I’m running 4.3.1, I’m curious if that already solves the bug. So I just upgraded to 4.4.1 and will see if I can still reproduce this.

1reaction
EhsanKiacommented, Oct 7, 2018

It might to have to do with your prompt number that increments with every command. When it goes from N digits to N+1 digits, your cursor gets misaligned. Still trying to find reliable repro steps, but I hit this bug regularly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bash - Why is the shortcut Ctrl + A jumping to the start of a line ...
Ctrl + a is jumping to the start of the line in Emacs, and libreadline uses the same key bindings as Emacs. Bash...
Read more >
Jump to beginning of line : r/vim - Reddit
37 votes, 54 comments. As we all know, default to jump to the beginning of the line is 0 and jump to the...
Read more >
Move to the beginning of a line – Microsoft Word shortcut
If you would like to jump quickly to the beginning of a line instead of having to use click or hold arrow keys...
Read more >
5 ways to navigate the Linux terminal faster | Enable Sysadmin
There's a better way to get around the command line. You can move the cursor to the beginning of the line with CTRL+A....
Read more >
how to jump to the beginning of line in vim - Stack Overflow
Press 0 to go to the beginning of a line, or ^ to go to the first non-blank character in a line.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found