Reflow with long input loses cursor #6918

Closed
opened 2026-01-31 00:50:28 +00:00 by claunia · 7 comments
Owner

Originally created by @carlos-zamora on GitHub (Mar 17, 2020).

Originally assigned to: @zadjii-msft on GitHub.

Environment

Windows Terminal version (if applicable) :0.10.721.0

Any other software?

Steps to reproduce

Not too sure what caused it but I know I have a really long path in the prompt. It's fine when I interact with it at first. But after attempting to run the command, and pasting the same path again, the cursor goes crazy. Specifically, I was ctrl+left and it started happening. Here's a gif:

  1. paste long path/command
  2. run it (mine failed, derp)
  3. press up (populates prompt)
  4. ctrl+left to browse the input

Actual behavior

cursor goes wack

reflow bug

Originally created by @carlos-zamora on GitHub (Mar 17, 2020). Originally assigned to: @zadjii-msft on GitHub. # Environment ```none Windows Terminal version (if applicable) :0.10.721.0 Any other software? ``` # Steps to reproduce Not too sure what caused it but I know I have a really long path in the prompt. It's fine when I interact with it at first. But after attempting to run the command, and pasting the same path again, the cursor goes crazy. Specifically, I was ctrl+left and it started happening. Here's a gif: 1. paste long path/command 2. run it (mine failed, derp) 3. press up (populates prompt) 4. ctrl+left to browse the input # Actual behavior cursor goes wack ![reflow bug](https://user-images.githubusercontent.com/11050425/76829418-63a03380-67e0-11ea-90ee-3b3187d8d049.gif)
Author
Owner

@carlos-zamora commented on GitHub (Mar 17, 2020):

@zadjii-msft Thoughts?

@carlos-zamora commented on GitHub (Mar 17, 2020): @zadjii-msft Thoughts?
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 17, 2020):

This may be a combination of the perfect wrap bug and this issue where sometimes the conpty host is off by one width

@DHowett-MSFT commented on GitHub (Mar 17, 2020): This may be a combination of the perfect wrap bug and this issue where sometimes the conpty host is off by one width
Author
Owner

@zadjii-msft commented on GitHub (Mar 17, 2020):

GAH I don't know what this is but I'll put it on me

@zadjii-msft commented on GitHub (Mar 17, 2020): GAH I don't know what this is but I'll put it on me
Author
Owner

@zadjii-msft commented on GitHub (Mar 17, 2020):

@carlos-zamora what's your prompt set to in powershell? I can't get this to repro with

$esc = [char]27; function prompt() { "${esc}[41mhas a newline${esc}[m`n${esc}[33;40mha ha ha${esc}[m> " }

Was there any actual resizing involved?

@zadjii-msft commented on GitHub (Mar 17, 2020): @carlos-zamora what's your prompt set to in powershell? I can't get this to repro with ``` $esc = [char]27; function prompt() { "${esc}[41mhas a newline${esc}[m`n${esc}[33;40mha ha ha${esc}[m> " } ``` Was there any actual resizing involved?
Author
Owner

@carlos-zamora commented on GitHub (Mar 17, 2020):

@carlos-zamora what's your prompt set to in powershell? I can't get this to repro with

$esc = [char]27; function prompt() { "${esc}[41mhas a newline${esc}[m`n${esc}[33;40mha ha ha${esc}[m> " }

Was there any actual resizing involved?

I guess it's just a reflow bug, not resize.

I have a custom prompt, but it's basically just the Powerline theme from oh-my-posh. I'm wondering if this is just another manifestation of #2432?

@carlos-zamora commented on GitHub (Mar 17, 2020): > @carlos-zamora what's your prompt set to in powershell? I can't get this to repro with > > ``` > $esc = [char]27; function prompt() { "${esc}[41mhas a newline${esc}[m`n${esc}[33;40mha ha ha${esc}[m> " } > ``` > > Was there any actual resizing involved? I guess it's just a reflow bug, not resize. I have a custom prompt, but it's basically just the Powerline theme from oh-my-posh. I'm wondering if this is just another manifestation of #2432?
Author
Owner

@zadjii-msft commented on GitHub (Mar 17, 2020):

I mean, I'm sure it's possible, though that one I'm positive that conpty and Terminal have the same contents in the buffer, while this one I'm a little more scared. I'll try oh-my-posh and see if that repros it for me.

@zadjii-msft commented on GitHub (Mar 17, 2020): I mean, I'm sure it's _possible_, though that one I'm positive that conpty and Terminal have the same contents in the buffer, while this one I'm a little more scared. I'll try `oh-my-posh` and see if that repros it for me.
Author
Owner

@carlos-zamora commented on GitHub (Mar 17, 2020):

Ok. We somehow couldn't get a repro of this. We're thinking it might be a powerline issue? But we're just gonna close this out until it pops up again. Spooky

@carlos-zamora commented on GitHub (Mar 17, 2020): Ok. We somehow couldn't get a repro of this. We're thinking it might be a powerline issue? But we're just gonna close this out until it pops up again. _Spooky_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6918