Closed sinister3vil closed 2 years ago
To help debug this, let's just focus on the conhost (cmd/powershell) and none of the other terminal applications, as they might complicate the repro.
bash
, zsh
, pwsh
, etc
infocmp
and stty -a
?I believe this is just a known limitation of Terminal's current TSF text input control.
Instead of inserting your typed characters into the terminal with the other text, it displays them on a layer on top of the terminal. It hasn't been updated to properly update the text underneath it.
and if you're using "retro", you can see how the little input box doesn't match the rest of the terminal :smile:
To help debug this, let's just focus on the conhost (cmd/powershell) and none of the other terminal applications, as they might complicate the repro.
Which shell application are you running on the Mikrotik RouterOS machine?
bash
,zsh
,pwsh
, etc
- do you have any extra config for that shell application that might be relevant?
- While ssh'd, could you share the output of
infocmp
andstty -a
?
Hello zadjii-msft,
While RouterOS is based on linux they have they're own shell implementation which does not allow normal *nix commands.
I believe this is just a known limitation of Terminal's current TSF text input control.
Instead of inserting your typed characters into the terminal with the other text, it displays them on a layer on top of the terminal. It hasn't been updated to properly update the text underneath it.
Just want to point out that it's not just the Terminal, as in Windows Terminal, but any terminal that uses conhost, to the best of my understanding.
Also want to point out that this seems to have started after the May 2019 Windows update, which I got during the summer, July or so.
Apologies for not being more helpful, being able to only casually reproduce this on Mikrotiks surely limits your ability to further debug the issue. I've also seen it on bash, on occasion, though I'm not sure where, but it was surely when running a terminal app that does it's own syntax highlighting on the input.
PS, you can fool around on a RouterOS shell here, if you believe it can help : ssh demo@demo.mt.lv (provided by Mikrotik)
Just wanted to add that by logging in as demo+c@demo.mt.tv it will disable all colors in the shell, and then the issue is more apparent, any text typed gets overlayed, so I'm guessing it has something to do with how "white" text is handled.
Do we have any progress regarding this issue? I'm having same problem when connecting via ssh to remote server, using bash shell.
Just to make this more baffling, I'll add my findings.
No issues on laptop with windows version 1909 and terminal 1.5
No issues on laptop with windows 20H2 and terminal 1.4 and 1.5
But then issues on PC with the same versions....
No issues with PowerShell
Issues with CMD and WSL
Commands without a space are safe to edit
If command contains a space then text overlapping happens on parts before last space. Last word is safe to edit.
However, irrespectively of cursor position, you can safely add letter which is after the cursor. Truly mysterious this behaviour is.
I've managed to diagnose this issue. In my case it was happening only when connection to remote server via ssh.
On remote machine, inside .profile
file, was line export TERM="xterm-color"
. Removing this line solved problem.
No more input overlay :)
Now that you mention it, my broken terminals have TERM="xterm-color". My working terminals have TERM="xterm-256color". Thanks.
Hey sorry this one sat on the backlog for so long. @sinister3vil you still seeing this? If so, did the remote machine have TERM=xterm-color
set? Does removing that fix it?
That's weird. TERM
should not be able to change this behavior! This is a well known issue in our IME implementation.
@DHowett looking at the original bug, I'm not sure there's any IME involved here. When we're proposing text via the IME, there's usually a tiny little underline, but that's not in this video at all.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Hey sorry this one sat on the backlog for so long. @sinister3vil you still seeing this? If so, did the remote machine have
TERM=xterm-color
set? Does removing that fix it?
Hello @zadjii-msft, unfortunately I don't have access to a windows system any more to test it. Still, imho, even if the issue was the terminal type set to xterm-color, which I cannot confirm for RouterOS, the terminal should work as expected with that type and just use an 8-color palette.
I'm playing around with the demo link you sent, and frankly I have no idea how to get the TERM out of that. I'd suspect that they're not even using TERM, since it doesn't seem to really be running a typical shell like bash
or fish
, it's some specific use shell.
I also can't get anything like the OP to occur anymore, which makes me think that the original bug was probably fixed sometime in the last two years. Thanks for filing this! Sorry there's not a more specific resolution here.
Environment
Steps to reproduce
When making corrections/inserting text, new text overlays over existing. This is clearly graphical, actual text sent is correct. This seems to be related to the text color. The most sure fire way reproduce is SSHing into Mikrotik RouterOS, where any input gets themed. Also happens in WSL, but haven't been able to reproduce effectively.
Below video better illustrates this.
https://www.youtube.com/watch?v=OkkZhDAl8sU
Expected behavior
Text should not overlay.
Actual behavior
Text gets overlayed.
Extra notes
This seems to be conhost related. Using the latest version of Terminus (https://github.com/Eugeny/terminus) with conPTY enabled does not produce this bug. Disabling conPTY results in this bug. Built-in windows consoles like cmd or powershell also have this issue. Non-console apps like PuTTY or MinTTY do not produce this bug.