Bug Report - third character causes line of input to snap back (post-git?) #2180

Closed
opened 2026-01-30 22:48:49 +00:00 by claunia · 2 comments
Owner

Originally created by @kierenj on GitHub (Jun 25, 2019).

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.175]
Windows Terminal version (if applicable): 0.2.1750.0

My font is Input Mono.

Steps to reproduce

Open Windows Terminal, PowerShell with this profile (it's basically posh-git and Chocolatey):

# poshgit...
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)

# Load posh-git module from current directory
Import-Module .\posh-git\posh-git

# If module is installed in a default location ($env:PSModulePath),
# use this instead (see about_Modules for more information):
# Import-Module posh-git


# Set up a simple prompt, adding the git prompt parts inside git repos
function global:prompt {
    $realLASTEXITCODE = $LASTEXITCODE

    Write-Host($pwd.ProviderPath) -nonewline

    Write-VcsStatus

    $global:LASTEXITCODE = $realLASTEXITCODE
    return "> "
}

Pop-Location

Start-SshAgent -Quiet

# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
  Import-Module "$ChocolateyProfile"
}

function semver { gitversion /output json /showvariable fullsemver }

$env:Path += (";" + $PSScriptRoot)
  1. Go to a git folder (such that the posh-git prompt appears)
  2. Type a character
  3. Type another character
  4. Type yet another character (the suspense is killing me!)

Expected behavior

The first two character stay as they were, and the third appears right next to them.

Actual behavior

The first two characters move to the left one position, and the third appears next to them. I.e. any commands 3 characters or greater get shifted to the left one position when the 3rd character is typed.

This occurs for any 3rd character, including spaces.

Have just found #635 ... it looks very similar but that talks about rendering characters the wrong width? That doesn't seem to be the case here?

Originally created by @kierenj on GitHub (Jun 25, 2019). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.175] Windows Terminal version (if applicable): 0.2.1750.0 ``` My font is `Input Mono`. # Steps to reproduce Open Windows Terminal, PowerShell with this profile (it's basically posh-git and Chocolatey): ``` # poshgit... Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) # Load posh-git module from current directory Import-Module .\posh-git\posh-git # If module is installed in a default location ($env:PSModulePath), # use this instead (see about_Modules for more information): # Import-Module posh-git # Set up a simple prompt, adding the git prompt parts inside git repos function global:prompt { $realLASTEXITCODE = $LASTEXITCODE Write-Host($pwd.ProviderPath) -nonewline Write-VcsStatus $global:LASTEXITCODE = $realLASTEXITCODE return "> " } Pop-Location Start-SshAgent -Quiet # Chocolatey profile $ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" if (Test-Path($ChocolateyProfile)) { Import-Module "$ChocolateyProfile" } function semver { gitversion /output json /showvariable fullsemver } $env:Path += (";" + $PSScriptRoot) ``` 1. Go to a git folder (such that the posh-git prompt appears) 2. Type a character 3. Type another character 4. Type yet another character (the suspense is killing me!) # Expected behavior The first two character stay as they were, and the third appears right next to them. # Actual behavior The first two characters move to the left one position, and the third appears next to them. I.e. any commands 3 characters or greater get shifted to the left one position when the 3rd character is typed. This occurs for any 3rd character, including spaces. Have just found #635 ... it looks very similar but that talks about rendering characters the wrong width? That doesn't seem to be the case here?
claunia added the Area-RenderingIssue-BugResolution-DuplicateProduct-Terminal labels 2026-01-30 22:48:49 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 26, 2019):

Posh-git's "prompt status" feature uses one of those "triple equals" symbols and some other branch markers, right? Those are probably categorized like the powerline symbols: double-width, but we don't know why.

@DHowett-MSFT commented on GitHub (Jun 26, 2019): Posh-git's "prompt status" feature uses one of those "triple equals" symbols and some other branch markers, right? Those are probably categorized like the powerline symbols: double-width, but we don't know why.
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 26, 2019):

Sorry. I meant to add before submitting: that means this likely is a duplicate of #635.

@DHowett-MSFT commented on GitHub (Jun 26, 2019): Sorry. I meant to add before submitting: that means this likely _is_ a duplicate of #635.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2180