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

Incorrect operation when scrolling through commands with vertical arrows #554

Open
gskoczylas opened this issue Nov 27, 2020 · 3 comments
Open

Comments

@gskoczylas
Copy link

gskoczylas commented Nov 27, 2020

I'm using clink within cmder. I think the problem is in the clink.

To illustrate the problem, let's assume that I executed the following commands in sequence:

  1. dir
  2. pushd c:\temp
  3. cd ..\Tools\
  4. dir /w
  5. popd

Now I want to execute one of the previous commands again. To do this, I press the up arrow key (on the keyboard).

  • After first pressing the button I see the popd command. For now everything is fine.
  • After second pressing the button I see the dir /w command. Still all right.
  • After third pressing the button I see the dcd ..\Tools\ command. Wrong! The first letter of the previous command (letter "d") is displayed before the actual command.
  • From now on, each subsequent command is preceded by this additional letter (d), for example: dpushd c:\temp, ddir, etc.
  • If I press Esc, the whole command is deleted, except for this additional letter d.

This additional letter at the beginning is only virtual. For example, if I see a ddir and execute this command, then I will execute the dir command - as if this additional letter was not there at the beginning.

You can live with it, but it's annoying and it interferes with your working comfort.

At first I did not have such problems. It happened at some point. I did not change any settings in the program. I didn't notice anything special that could change this behavior.

Environment: Windows 10 Enterprise ver. 1909

@chrisant996
Copy link

It's because of a combination of things. There are many posts about it in the Cmder issues list with more information, including how to change the lambda character.

  1. The lambda character that's part of the prompt is represented as different widths in different fonts.
  2. Cmder is using a different font than the OS expects to be used, and the two fonts have different widths for the lambda.
  3. Since this was posted, Clink from chrisant996/clink introduced a change that should compensate for the mismatched font problem, and at least make characters show up in the right spots, although sometimes there will be extra spaces between characters or a line might not fit as many characters as it looks like should fit.

@gskoczylas
Copy link
Author

In the latest version of Cmder the problem does not occur for me anymore (Windows 10 Pro PL & Windows 10 Ent EN).

@chrisant996
Copy link

In the latest version of Cmder the problem does not occur for me anymore (Windows 10 Pro PL & Windows 10 Ent EN).

Yup. Cmder switch to including Clink from chrisant996/clink a few months ago. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants