Skip to content

Problem with wrapping and terminal input #2251

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

Closed
WembleyFord2 opened this issue Oct 23, 2019 · 6 comments
Closed

Problem with wrapping and terminal input #2251

WembleyFord2 opened this issue Oct 23, 2019 · 6 comments
Labels
Area-PSReadLine Issue-Bug A bug to squash. Resolution-Duplicate Will close automatically.

Comments

@WembleyFord2
Copy link

Issue Description

I am experiencing a problem with the terminal when it reaches the bottom of the terminal windows, wrapping breaks. For instance, if I type a series of characters longer than the line it wraps as one would expect and left and right cursor movements work as expected.

working

If the cursor gets to the last time of the window, then the behaviour breaks down. For instance, the cursor no longer moves up and down between the current line and the previous one.

wrapping

And using backspace to delete characters from the upper part of the line causes even more distortion.

backspace

I've tested this on a clean installation of Ubuntu 18.04 with the latest Powershell, Code and Powershell Extension (and also the Preview extention). My LANG is set to en-GB.UTF-8. There are no problems with pwsh running from within bash on an xterm or Gnome Terminal or any other terminal, and there are no problems with the bash terminal in Core.

Any advice would be very welcome. This is making development work of PS scripts a real problem.

Environment Information

Visual Studio Code

Name Version
Operating System Linux x64 4.15.0-65-generic
VSCode 1.39.2
PowerShell Extension Version 2019.9.0

PowerShell Information

Name Value
PSVersion 6.2.3
PSEdition Core
GitCommitId 6.2.3
OS Linux 4.15.0-65-generic %2374-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019
Platform Unix
PSCompatibleVersions 1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.2.3
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Visual Studio Code Extensions

Visual Studio Code Extensions(Click to Expand)
Extension Author Version
bash-debug rogalmic 0.3.6
csharp ms-vscode 1.21.5
partial-diff ryu1kn 1.4.0
perl-debug mortenhenriksen 0.6.3
perl-toolbox d9705996 1.3.2
powershell ms-vscode 2019.9.0
prettier-vscode esbenp 2.3.0
printcode nobuhito 3.0.0
puppet-vscode jpogran 0.21.0
vscode-emacs-friendly lfs 0.9.0
@ghost ghost added the Needs: Triage Maintainer attention needed! label Oct 23, 2019
@SydneyhSmith
Copy link
Collaborator

@WembleyFord2 thanks for opening this issue and providing detailed information...PSReadLine provides some of the code wrapping behavior and so having it enabled may resolve this issue...can you confirm that in your VSCode settings you have "powershell.developer.featureFlags": ["PSReadLine"], (note that this will only help if you are also using the PowerShell Preview extension). Please let us know if you are still running into this issue even with PSReadLine enabled...thanks!

@SydneyhSmith SydneyhSmith added Area-PSReadLine Issue-Bug A bug to squash. Needs-Repro-Info and removed Needs: Triage Maintainer attention needed! labels Oct 23, 2019
@WembleyFord2
Copy link
Author

WembleyFord2 commented Oct 24, 2019

Thanks for that suggestion - it does seem to have cured the problem. I did not have any powershell.developer.featureFlags line in the settings .json file - adding it in with PSReadLine did fix the issue. I must admit I am curious as to why this is broken out of the box and no-else seems to have noticed it.

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Oct 24, 2019
@TylerLeonhardt
Copy link
Member

Just fair warning, the PSReadLine experience isn't the best on PowerShell 6... We highly recommend using PowerShell 7 (which is in preview) for a much nicer experience.

@gwojan
Copy link

gwojan commented Oct 24, 2019

@TylerLeonhardt Just curious, but what's different in PowerShell 7 that makes the PSReadLine experience better?

@TylerLeonhardt
Copy link
Member

@gwojan PowerShell 7 moved to .NET Core 3.0. In .NET Core 3.0, the completely redid the System.Console APIs. In that change, the made the PowerShell Integrated Console experience much more stable and "what you would expect".

For example,

  • scrolling up works in PS 7 (not in PS 6, where it jumps back down to the bottom of the screen)
  • the sudo command (or any other command that prompts) doesn't time out immediately

and a few other small details.

We feel that it's not worth it to put in the engineering effort to fix this for PowerShell 6 as that will go EOL 6 months after PowerShell 7's release (which is around when we will be shipping this PSRL stuff into stable).

@SydneyhSmith
Copy link
Collaborator

@WembleyFord2 glad to hear that resolved the issue for you, I will close this as a duplicate as PSReadLine, with a feature flag, is available in the PowerShell Preview extension, and we are tracking that PSReadLine is not available in the main PowerShell Extension here #1793

@SydneyhSmith SydneyhSmith added Resolution-Duplicate Will close automatically. and removed Needs-Repro-Info Needs: Maintainer Attention Maintainer attention needed! labels Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-PSReadLine Issue-Bug A bug to squash. Resolution-Duplicate Will close automatically.
Projects
None yet
Development

No branches or pull requests

4 participants