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

Cursor Style using conemu-cyg-64.exe #573

Closed
cheuer opened this Issue Mar 11, 2016 · 15 comments

Comments

Projects
None yet
4 participants
@cheuer

cheuer commented Mar 11, 2016

I recently set up the cygwin terminal connector (connector version 0.74, ConEmu version 160310) to get better color support, and I noticed that my cursor in vim (both locally and over SSH) wasn't changing to block mode. It looks like the connector doesn't support the cursor style escape sequences that cygwin bash does.

These two commands should switch the cursor to blinking block and blinking bar, respectively:

echo -ne "\e[1 q"
echo -ne "\e[5 q"

Both of the above work using bash, but when using the connector it just stays as the cursor I specified in the settings. Here are the task commands I am using for each:

set CHERE_INVOKING=1 & C:\cygwin\bin\bash.exe --login -i
set CHERE_INVOKING=1 & C:\cygwin\bin\conemu-cyg-64.exe

Here is the spec for the escape sequences, taken from http://invisible-island.net/xterm/ctlseqs/ctlseqs.html:

CSI Ps SP q
          Set cursor style (DECSCUSR, VT520).
            Ps = 0  -> blinking block.
            Ps = 1  -> blinking block (default).
            Ps = 2  -> steady block.
            Ps = 3  -> blinking underline.
            Ps = 4  -> steady underline.
            Ps = 5  -> blinking bar (xterm).
            Ps = 6  -> steady bar (xterm).

For what it's worth, it looks like bash only supports 1 and 5 from that list. If I echo 0-2 it does blinking block, and 3-6 do a blinking bar. It would be great if you could add support for these two in the cygwin connector.

@austinwagner

This comment has been minimized.

Show comment
Hide comment
@austinwagner

austinwagner May 20, 2016

With the new Linux Subsystem I would also like to see ConEmu support these, including the extended xterm options.

austinwagner commented May 20, 2016

With the new Linux Subsystem I would also like to see ConEmu support these, including the extended xterm options.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 May 20, 2016

Owner

@austinwagner You've chosen wrong place for feature request!

You have to force Microsoft to do WSL<->console interactions in user mode! Until they are processed in kernel internally - they utterly limit ConEmu abilities!!

Owner

Maximus5 commented May 20, 2016

@austinwagner You've chosen wrong place for feature request!

You have to force Microsoft to do WSL<->console interactions in user mode! Until they are processed in kernel internally - they utterly limit ConEmu abilities!!

@austinwagner

This comment has been minimized.

Show comment
Hide comment
@austinwagner

austinwagner May 20, 2016

@Maximus5 I thought the escape codes were passed through to the terminal. Doesn't the new version of the default command prompt host interpret ANSI SGR escape codes itself?

austinwagner commented May 20, 2016

@Maximus5 I thought the escape codes were passed through to the terminal. Doesn't the new version of the default command prompt host interpret ANSI SGR escape codes itself?

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 May 20, 2016

Owner

@austinwagner Regardless the fact Win10 console interprets ANSI itself, WSL subsystem is working in the kernel, it does not write anything to console at all. Complain to MS about it!

Owner

Maximus5 commented May 20, 2016

@austinwagner Regardless the fact Win10 console interprets ANSI itself, WSL subsystem is working in the kernel, it does not write anything to console at all. Complain to MS about it!

@austinwagner

This comment has been minimized.

Show comment
Hide comment
@austinwagner

austinwagner May 20, 2016

"Complained" in the feedback hub application. I doubt they'll ever read a piece of feedback with no votes on it, but one can hope...

austinwagner commented May 20, 2016

"Complained" in the feedback hub application. I doubt they'll ever read a piece of feedback with no votes on it, but one can hope...

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 May 20, 2016

Owner

I doubt a lot in "hub" effect.
Perhaps, project site is much better :D

[https://github.com/Microsoft/BashOnWindows/issues?utf8=✓&q=is:issue is:open ConEmu](https://github.com/Microsoft/BashOnWindows/issues?utf8=✓&q=is:issue is:open ConEmu)

Owner

Maximus5 commented May 20, 2016

I doubt a lot in "hub" effect.
Perhaps, project site is much better :D

[https://github.com/Microsoft/BashOnWindows/issues?utf8=✓&q=is:issue is:open ConEmu](https://github.com/Microsoft/BashOnWindows/issues?utf8=✓&q=is:issue is:open ConEmu)

@austinwagner

This comment has been minimized.

Show comment
Hide comment
@austinwagner

austinwagner May 20, 2016

@Maximus5 My Google skills are shamed. I tried and failed to find a better place to submit my feedback.

austinwagner commented May 20, 2016

@Maximus5 My Google skills are shamed. I tried and failed to find a better place to submit my feedback.

Maximus5 added a commit that referenced this issue May 23, 2016

gh-573: Support ANSI sequence to set cursor style (DECSCUSR, VT520).
~~~
CSI Ps SP q - Set cursor style (DECSCUSR, VT520).
		Ps = 0  -> ConEmu's default.
		Ps = 1  -> blinking block.
		Ps = 2  -> steady block.
		Ps = 3  -> blinking underline.
		Ps = 4  -> steady underline.
		Ps = 5  -> blinking bar (xterm).
		Ps = 6  -> steady bar (xterm).
~~~
@cheuer

This comment has been minimized.

Show comment
Hide comment
@cheuer

cheuer May 23, 2016

Just updated to build 160522 and tested out the cursor escape sequences, it's working exactly as expected, thanks!

cheuer commented May 23, 2016

Just updated to build 160522 and tested out the cursor escape sequences, it's working exactly as expected, thanks!

@Maximus5 Maximus5 closed this May 23, 2016

@Kyshtynbai

This comment has been minimized.

Show comment
Hide comment
@Kyshtynbai

Kyshtynbai Feb 1, 2018

I'm afraid I am facing this issue again. Windos 10 + WSL + 180131 alpha conemu build

Kyshtynbai commented Feb 1, 2018

I'm afraid I am facing this issue again. Windos 10 + WSL + 180131 alpha conemu build

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Feb 2, 2018

Owner

@Kyshtynbai HOW do you ru WSL?

Owner

Maximus5 commented Feb 2, 2018

@Kyshtynbai HOW do you ru WSL?

@Kyshtynbai

This comment has been minimized.

Show comment
Hide comment
@Kyshtynbai

Kyshtynbai Feb 2, 2018

@Maximus5
My reply was not full enough. Fixing it:
After the instalation of ConEmu, it has created a task for WSL automatically. This version of the task had the issues with cursor in vim, like no selection in visual blocks, or non-functioning incsearch.

I re-wrote the command for the task according to the related manual on ConEmu site and the problem has gone -- now visual blocks, incremantal search highliting and so on works fine.

The only thing that still does not work is the same identical cursor both in command and insert mode of vim, but I think I can get on with it.

Kyshtynbai commented Feb 2, 2018

@Maximus5
My reply was not full enough. Fixing it:
After the instalation of ConEmu, it has created a task for WSL automatically. This version of the task had the issues with cursor in vim, like no selection in visual blocks, or non-functioning incsearch.

I re-wrote the command for the task according to the related manual on ConEmu site and the problem has gone -- now visual blocks, incremantal search highliting and so on works fine.

The only thing that still does not work is the same identical cursor both in command and insert mode of vim, but I think I can get on with it.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Feb 2, 2018

Owner

ConEmu creates proper task for WSL. You don't have to change it.
Without explicit examples your description is still unclear.

Owner

Maximus5 commented Feb 2, 2018

ConEmu creates proper task for WSL. You don't have to change it.
Without explicit examples your description is still unclear.

@Kyshtynbai

This comment has been minimized.

Show comment
Hide comment
@Kyshtynbai

Kyshtynbai Feb 2, 2018

Okay, I'll try to make an example

  1. This is a default task, created by ConEmu:
    %windir%\system32\bash.exe -cur_console:pm:/mnt
    Consoles, created with this task, show issues I've desribed, let's see in on a screenshot of a vim with incsearch process:
    http://i100.fastpic.ru/big/2018/0202/5b/e5ea35880007495f3243132a7f8cc35b.png
    No incsearch highlight.

  2. This is manualy added task:
    set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pnm:/mnt -t bash -l
    (I also added path to custom icon in the parametres string, I dont post it here)
    and here is a screenshot with the same attepmpt, as described above:
    http://i102.fastpic.ru/big/2018/0202/64/18cc337a89c214a8f0b88b056eb79864.png
    Incremental search highlight works ok.

And in both cases cursor it the same in command and insert mode.

Kyshtynbai commented Feb 2, 2018

Okay, I'll try to make an example

  1. This is a default task, created by ConEmu:
    %windir%\system32\bash.exe -cur_console:pm:/mnt
    Consoles, created with this task, show issues I've desribed, let's see in on a screenshot of a vim with incsearch process:
    http://i100.fastpic.ru/big/2018/0202/5b/e5ea35880007495f3243132a7f8cc35b.png
    No incsearch highlight.

  2. This is manualy added task:
    set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pnm:/mnt -t bash -l
    (I also added path to custom icon in the parametres string, I dont post it here)
    and here is a screenshot with the same attepmpt, as described above:
    http://i102.fastpic.ru/big/2018/0202/64/18cc337a89c214a8f0b88b056eb79864.png
    Incremental search highlight works ok.

And in both cases cursor it the same in command and insert mode.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Feb 2, 2018

Owner

Nope.

%windir%\system32\bash.exe -cur_console:pm:/mnt

This is not the actual default task. Read this:
https://conemu.github.io/en/Tasks.html#add-default-tasks

If course you will have issues with WSL running it using inappropriate way.

As for the problem running WSL from proper task via connector... Have you tried it without ConEmu?

Owner

Maximus5 commented Feb 2, 2018

Nope.

%windir%\system32\bash.exe -cur_console:pm:/mnt

This is not the actual default task. Read this:
https://conemu.github.io/en/Tasks.html#add-default-tasks

If course you will have issues with WSL running it using inappropriate way.

As for the problem running WSL from proper task via connector... Have you tried it without ConEmu?

@Kyshtynbai

This comment has been minimized.

Show comment
Hide comment
@Kyshtynbai

Kyshtynbai Feb 2, 2018

As for the problem running WSL from proper task via connector... Have you tried it without ConEmu?

I've tried it just now and it seens everything works OK (like with the running WSL from proper task), but the cursor in vim still does not change depeding on command/insert mode.
It looks like this problem is not in ConEmu. Other issues are solved by running a proper task. Thank you.

Kyshtynbai commented Feb 2, 2018

As for the problem running WSL from proper task via connector... Have you tried it without ConEmu?

I've tried it just now and it seens everything works OK (like with the running WSL from proper task), but the cursor in vim still does not change depeding on command/insert mode.
It looks like this problem is not in ConEmu. Other issues are solved by running a proper task. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment