Skip to content

Git Bash/winpty - blank lines when wrapping in interactive cli #45682

Description

@monk-time

Issue Type: Bug

I'm using Git Bash (2.16.2.windows.1, the latest version) as integrated terminal on Win7x64. The recommended way of launching interactive console programs with this setup is through winpty, and it worked fine in VSCode ~1.17-1.20.

After updating to 1.21.0, when I run such programs (e.g. python/haskell/node REPLs) through winpty in the VSCode's integrated terminal (Git Bash) it now adds a blank line after each wrapped line. Same happens in a fresh copy (no settings/extensions) of today's VSCode Insiders.

Steps to reproduce:

  1. Set C:\\Program Files\\Git\\bin\\bash.exe as the integrated terminal.
  2. Run in the terminal: winpty python, print(list(range(150)))
    Or: winpty node, 'a'.repeat(500)
    Or: winpty stack exec ghci, [1..150]

Current behavior: multiple blank lines are printed in the output of this command.
Expected behavior: no blank lines.

Illustration: (I'm calling "python" to disable my alias)
code - insiders_2018-03-13_19-48-43

Possible workaround: python/node/stack exec ghci without winpty wraps lines properly, but at the very least navigating command history with arrow keys in python repl is broken. Issues like that (Git Bash as external terminal is unable to run python/node without winpty at all) are what necessitates using winpty, but seems like something related to the console splitting feature in 1.21 broke that.


VS Code version: Code - Insiders 1.22.0-insider (1126701, 2018-03-13T05:16:22.707Z)
OS version: Windows_NT x64 6.1.7601

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz (8 x 2494)
Memory (System) 15.92GB (9.56GB free)
Process Argv D:\VSCode-win32-x64-1.22.0-insider\Code - Insiders.exe
Screen Reader no
VM 0%
Extensions: none

Reproduces without extensions

Metadata

Metadata

Assignees

Labels

terminalGeneral terminal issues that don't fall under another label

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions