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

Feature Request: ConEmu Command Line Cursor Position #986

Open
klcobb opened this Issue Dec 16, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@klcobb

klcobb commented Dec 16, 2016

ConEmu build: 161206 x64
OS version: Windows WIN8 x64
Used shell version powershell

In a nut shell, would like the cursor position to go to the end of the last character typed when I click away from the command line and then back to it. An example using Mercurial HG command line in ConEmu:

  1. Type 'hg status' and get a list of files that are waiting to be commited
  2. Type 'hg diff ' and then use mouse to dbl click (copy) one of the file paths listed from the 'hg status' command in step 1
  3. Click back on the command line, and the cursor position is back to beginning of the line, not the end of the line. I have to click again at the end of the line to get the cursor position to the end. Then I can paste the copied text to the end and run the 'hg diff filepath' command
@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Dec 16, 2016

Owner

You are doing smth wrong and ConEmu just replicates your requests.
git status, git add <pasted-by-mouse-click> sequence is my daily used behavior.

Owner

Maximus5 commented Dec 16, 2016

You are doing smth wrong and ConEmu just replicates your requests.
git status, git add <pasted-by-mouse-click> sequence is my daily used behavior.

@klcobb

This comment has been minimized.

Show comment
Hide comment
@klcobb

klcobb Jan 3, 2017

If I type anything on the command line, then use the mouse to select some other text on the screen to copy, then mouse click at the end of the line I just typed, my cursor ends up at the beginning of the command line, not at the end, where I clicked. If that's working as designed, then OK, but I'm not doing something wrong. I've attached a screencast movie that shows shows what I mean.

2017-01-03 09-09-42.zip

klcobb commented Jan 3, 2017

If I type anything on the command line, then use the mouse to select some other text on the screen to copy, then mouse click at the end of the line I just typed, my cursor ends up at the beginning of the command line, not at the end, where I clicked. If that's working as designed, then OK, but I'm not doing something wrong. I've attached a screencast movie that shows shows what I mean.

2017-01-03 09-09-42.zip

@philipep

This comment has been minimized.

Show comment
Hide comment
@philipep

philipep Jan 3, 2017

same version of ConEmu running on win7 pro with cmd shell and same issue.
cursor moves back at the beginning of the line as soon as I click anywhere on conEmu screen.

philipep commented Jan 3, 2017

same version of ConEmu running on win7 pro with cmd shell and same issue.
cursor moves back at the beginning of the line as soon as I click anywhere on conEmu screen.

Maximus5 added a commit that referenced this issue Jan 18, 2017

Moving some prompt features to GUI (Click & CtrlBS).
  Ref: gh-986, gh-317, gh-845

  Now ‘Change prompt text cursor position with Left Click’
  and ‘Ctrl+Backspace - delete word leftward to the text cursor’
  are process by ConEmu GUI without posting command to ConEmuHk.

  The feature requires properly reported by the shell prompt start pos.
  For bare cmd.exe it's done automatically by ConEmuHk.
  All other shells must report the start of the prompt with ANSI.

  * https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC
  * https://conemu.github.io/en/CygwinMsysConnector.html

  For example, while using bash and connector you may add to the end
  of your `PS1` the following sequence: `\[\033]9;12\007\]`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment