Skip to content
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

broken code in vscode 1.34 OS Mojave 10.14.5 #74565

Closed
tokenflow opened this issue May 29, 2019 · 10 comments
Closed

broken code in vscode 1.34 OS Mojave 10.14.5 #74565

tokenflow opened this issue May 29, 2019 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities macos Issues with VS Code on MAC/OS X terminal Integrated terminal issues
Milestone

Comments

@tokenflow
Copy link

Environment data

VScode 1.34
OS Mojave 10.14.5

Sample Code

def test():
    print("0 test line.")
    print("1 test line.")
    print("2 test line.")
    print("3 test line.")
    print("4 test line.")
    print("5 test line.")
    print("6 test line.")
    print("7 test line.")
    print("8 test line.")
    print("9 test line.")
    print("10 test line.")
    print("11 test line.")
    print("12 test line.")
    print("13 test line.")
    print("14 test line.")
    print("15 test line.")
    print("16 test line.")
    print("17 test line.")
    print("18 test line.")
    print("19 test line.")
    print("20 test line.")
    print("21 test line.")
    print("22 test line.")
    print("23 test line.")
    print("24 test line.")
    print("25 test line.")
    print("26 test line.")
    print("27 test line.")
    print("28 test line.")
    print("29 test line.")
    print("30 test line.")
    print("31 test line.")
    print("32 test line.")
    print("33 test line.")
    print("34 test line.")
    print("35 test line.")
    print("36 test line.")
    print("37 test line.")
    print("38 test line.")
    print("39 test line.")
    print("40 test line.")
    print("41 test line.")
    print("42 test line.")
    print("43 test line.")
    print("44 test line.")
    print("45 test line.")
    print("46 test line.")
    print("47 test line.")
    print("48 test line.")
    print("49 test line.")
    print("50 test line.")
    print("51 test line.")
    print("52 test line.")
    print("53 test line.")
    print("54 test line.")
    print("55 test line.")
    print("56 test line.")
    print("57 test line.")
    print("58 test line.")
    print("59 test line.")
    print("60 test line.")
    print("61 test line.")
    print("62 test line.")
    print("63 test line.")
    print("64 test line.")
    print("65 test line.")
    print("66 test line.")
    print("67 test line.")
    print("68 test line.")
    print("69 test line.")
    print("70 test line.")
    print("71 test line.")
    print("72 test line.")
    print("73 test line.")
    print("74 test line.")
    print("75 test line.")
    print("76 test line.")
    print("77 test line.")
    print("78 test line.")
    print("79 test line.")
    print("80 test line.")
    print("81 test line.")
    print("82 test line.")
    print("83 test line.")
    print("84 test line.")
    print("85 test line.")
    print("86 test line.")
    print("87 test line.")
    print("88 test line.")
    print("89 test line.")
    print("90 test line.")
    print("91 test line.")
    print("92 test line.")
    print("93 test line.")
    print("94 test line.")
    print("95 test line.")
    print("96 test line.")
    print("97 test line.")
    print("98 test line.")

Expected behaviour

Shift+Enter should work regardless of the size of the selected code.
**Actual Results**
terminal code is broken as below

IndentationError: unexpected indent
>>>     print("85 test line."    print("85 test line."    print("85 test line."  ."    print("85 test line."    print("85 test line."  ."    print("85 test line."."    print("85 test line."."    print("85 test line."."    print("85 test line."."    print("85 test line.".")
  File "<stdin>", line 1
    print("85 test line."    print("85 test line."    print("85 test line."  ."    print("85 test line."    print("85 test line."  ."    print("85 test line."."    print("85 test line."."    print("85 test line."."    print("85 test line."."    print("85 test line.".")
    ^
IndentationError: unexpected indent
>>>     print("95 test line."    print("95 test line.".")
  File "<stdin>", line 1
    print("95 test line."    print("95 test line.".")
    ^
IndentationError: unexpected indent
>>>     print("97 test line.")
  File "<stdin>", line 1
    print("97 test line.")
    ^
IndentationError: unexpected indent
>>>     print("98 test line.")
  File "<stdin>", line 1
    print("98 test line.")
    ^
IndentationError: unexpected indent

I know it looks duplicate, but yet the problem is still not solved

@vscodebot
Copy link

vscodebot bot commented May 29, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@kieferrm
Copy link
Member

@tokenflow If I understand the issue correctly this is an issue with the Python interactive window. Please file the issue against the Python extension. Thanks!

@kieferrm kieferrm added the *caused-by-extension Issue identified to be caused by an extension label May 29, 2019
@vscodebot
Copy link

vscodebot bot commented May 29, 2019

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines.

Happy Coding!

@jrounds
Copy link

jrounds commented May 31, 2019

@kieferrm how are you certain it is a python extension error when you can create what appears to be the same error in just the integrated/external terminal and with manual pasting into the terminal?

Also for example, one can disable the python extension, reload vscode, start python in the terminal and the issue persist.

@jrounds
Copy link

jrounds commented May 31, 2019

What confuses me the most about this issue is I 100% recreate the original posted issue on my laptop python/terminal in vscode, but if in that same terminal, I ssh into a remote machine and start python, and run selection/paste, it works as expected.

@kieferrm
Copy link
Member

I'm not certain. I tried to make sense out of the original description you provided. You just provided the steps that allow us to reproduce the problem.

@kieferrm kieferrm reopened this May 31, 2019
@kieferrm kieferrm added terminal Integrated terminal issues and removed *caused-by-extension Issue identified to be caused by an extension labels May 31, 2019
@Tyriar
Copy link
Member

Tyriar commented Jun 1, 2019

/duplicate #38137

@Tyriar Tyriar closed this as completed Jun 1, 2019
@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Jun 1, 2019
@Tyriar
Copy link
Member

Tyriar commented Jun 1, 2019

Actually this is different to #38137, I don't think we have an issue tracking this yet. I'm not sure why it happens as we just send the text that is pasted, but it doesn't happen in mac's default terminal.

@Tyriar Tyriar reopened this Jun 1, 2019
@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities and removed *duplicate Issue identified as a duplicate of another issue(s) labels Jun 1, 2019
@Tyriar Tyriar added this to the October 2019 milestone Oct 9, 2019
@Tyriar Tyriar modified the milestones: October 2019, Backlog Oct 26, 2019
@bartholomew-gander
Copy link

I can not reproduce this on

Version: 1.52.1
Commit: ea3859d
Date: 2020-12-16T16:30:02.420Z (1 mo ago)
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 20.2.0

python = Python 2.7.16
python3 = Python 3.9.1
Python extension: v2020.12.42445256

Steps I tried:

  1. Open vscode
  2. Open new terminal inside vscode
  3. Type in python or python3 to run python in terminal
  4. Paste mentioned code with Cmd+V
  5. Press return to execute code

I also tried Python extension v2020.12.424452561 and running mentioned code with Shift+Return. All tries were success. Tried selecting whole code, last line, some of the lines, everything looks okay.

@Tyriar Tyriar added the macos Issues with VS Code on MAC/OS X label Jul 16, 2021
@Tyriar
Copy link
Member

Tyriar commented Aug 27, 2021

This works fine for me and we do support bracketed paste mode which is the typical way that shells support this by enabling differentiation between regular new lines and pasted new lines. Let me know if this still happens with shell/version/os details and a gif.

@Tyriar Tyriar closed this as completed Aug 27, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities macos Issues with VS Code on MAC/OS X terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

5 participants