microsoft / microsoft/edit

Pasted code shifted and unusable

Open
#771 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
14.6k
Forks
734
Avg merge
8h 40m
Merged PRs (30d)
4

Description

I have a large script that I am wanting to use to create a file on a server that I am SSH'd into. I am SSH'd into a Server 2019 system running

PS > sshd -V
OpenSSH_for_Windows_9.5p2, LibreSSL 3.8.2

I have SSH'ing to this system from an Ubuntu WSL system, from a Windows CMD shell, and from a PowerShell v5 shell. The results are all the same. My code is seriously shifted beyond repair

Image

When I paste the same code into VS Code everything is fine

Image

additionally, when I start a new file when SSH'd in from the Ubuntu WSL system I get the strange characters at the top of the file (I thought this was fixed)

Image

The strange characters at the top of the file does not happen when I open / start a new file when SSH'ing from the Windows CMD or Widnows PowerShell shells.

Edit is at the current version - v 1.2.1

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in Edit v1.2.1 over SSH from Ubuntu WSL, Windows CMD, and PowerShell using the large pasted script described here. Compare the resulting alignment and file headers with local VS Code and determine whether the terminal input or file creation path causes the difference. Done means pasted code remains usable and the unexpected characters do not appear in the affected environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.