Skip to content

Terminal filled with ^[[D^[[D^[[D^[[D when alt-clicking a link #101136

Description

  • VSCode Version: 1.46.1
  • OS Version: Ubuntu 20.04 LTS x86_64
  • shell: bash

When alt-clicking in terminal (e. g. to open a file or URL), it gets filled up with lots of ^[[D^[[D^[[D^[[D or ^[[C^[[C^[[C^[[C:

image

Steps to Reproduce:

  1. Open integrated terminal
  2. Run read (or, for a more practical example, yarn create react-app . && yarn start in a temp dir)
  3. Alt-click anywhere

Does this issue occur when all extensions are disabled?: Yes

Activity

  1. davatron5000 commented on Jun 30, 2020

    @davatron5000

    Having the same issue in WSL with Ubuntu 18.04 when alt+clicking any link.

    Copied 111 files / Wrote 420 files in 3.46 seconds (8.2ms each, v0.11.0)
    Watching…
    [Browsersync] Access URLs:
     --------------------------------------
           Local: http://localhost:8080
        External: http://192.168.1.205:8080
     --------------------------------------
              UI: http://localhost:3001
     UI External: http://localhost:3001
     --------------------------------------
    [Browsersync] Serving files from: _site
    ^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[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D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D```
    
  2. Tyriar commented on Jul 7, 2020

    @Tyriar
    Contributor

    Looks like this is an issue where the alt+click feature (move cursor when clicking) is conflicting with links, only when "editor.multiCursorModifier": "ctrlCmd" is used.

  3. added
    bug
    terminal
    on Jul 7, 2020
  4. added this to the Backlog milestone on Jul 7, 2020
  5. securedirective commented on Aug 14, 2020

    @securedirective

    This issue also occurs on MacOS, only with Opt+Click instead of Alt+Click.

    I thought at first that this was related to the Opt+Click on a detected link in the terminal (since that is an Alt+Click on Windows/Linux). But this truly does occur when Opt+Clicking anywhere in the terminal while a read command is waiting for input.

    Daniel Imms (@Tyriar) I can confirm that this occurs on my MacOS regardless of the value of "editor.multiCursorModifier" setting.

  6. yulinfeng000 commented on Aug 14, 2020

    @yulinfeng000

    set "terminal.integrated.macOptionIsMeta": true in setting.json , now the way you click url is cmd + click, and it wont happen again

  7. securedirective commented on Aug 14, 2020

    @securedirective

    Cam (@yulinfeng000), nope, that only slightly changes the junk that is dumped into the Terminal, but it doesn't get rid of it...

    With "terminal.integrated.macOptionIsMeta": false (default):

    11:20:12 0 user@laptop ~ > read -p "Type something: " testvar
    Type something: ^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[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[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^C
    
  8. yulinfeng000 commented on Aug 14, 2020

    @yulinfeng000

    Cam (@yulinfeng000), nope, that only slightly changes the junk that is dumped into the Terminal, but it doesn't get rid of it...

    With "terminal.integrated.macOptionIsMeta": false (default):

    11:20:12 0 user@laptop ~ > read -p "Type something: " testvar
    Type something: ^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[C^[[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[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^C
    

    emmm, you say is right, i just change a way to open url in vscode terminal to avoid echo ^[[D but not fix it , this also occurs in terminal.app, item.app if you use option + click.

    by the way,my final setting as follows

      "editor.multiCursorModifier": "alt",
     "terminal.integrated.macOptionIsMeta": true
    

    (if "editor.multiCursorModifier": "ctrlcmd" , vscode still let you click url with option + click )
    image

  9. securedirective commented on Aug 14, 2020

    @securedirective

    Oh! That's a great observation, Cam (@yulinfeng000).... Alt+Click fills the terminal with junk even in the standard MacOS Terminal app and also in iTerm2.

    Now, I am aware that Alexander Pushkov (@notpushkin) is originally reporting this for Ubuntu. I checked my Linux laptop (Fedora 31), and Alt+Click in the standard system terminal emulator does nothing. It only occurs in VSCode's terminal.

    But this still makes me wonder if all of this is system-level issues, or perhaps terminal "emulator" issues, not really a VSCode issue. Hard to know. But the Microsoft devs would know.

  10. securedirective commented on Aug 14, 2020

    @securedirective

    As for your workaround, Cam (@yulinfeng000), thank you so much for that!!! I still don't see any change in VSCode's behavior when using "terminal.integrated.macOptionIsMeta": true, but changing "editor.multiCursorModifier" definitely avoids the core issue.

    I hope you don't mind me describing in more detail...

    • According to VSCode documentation for editor.multiCursorModifier, "The Go To Definition and Open Link gestures will also respect this setting and adapt such that they do not conflict. For example, when the setting is ctrlCmd, multiple cursors can be added with Ctrl/Cmd+Click, and opening links or going to definition can be invoked with Alt+Click."
    • You probably did what I did when originally installing VSCode... I'm using to using Ctrl+Click in Linux and Cmd+Click in MacOS to multi-select files in Finder, items in a list, etc. So I set "editor.multiCursorModifier" to be ctrlCmd. However, this means that attempting to click on a link in the terminal (for example, an error message referencing the offending line in your source code) requires the use of the other shortcut (Alt + Click).
    • Since it seems that Linux and MacOS have various strange behaviors when Alt + Clicking in a terminal, you are suggesting we switch back to the default "editor.multiCursorModifier": "alt". Now we'll use Ctrl+Click / Cmd+Click to follow links in the Terminal, avoiding all that ^[[D^[[D^[[D^[[D nonsense that sometimes causes the terminal to hang.
    • For multi-selecting in the editor window, we'll have to get used to using Alt + Click for that, but in my opinion, that is better than having terminal hanging issues unexpectedly.
  11. securedirective commented on Aug 14, 2020

    @securedirective

    So to clarify what I originally posted to Daniel Imms (@Tyriar)... Alt+Click will still cause junk to fill the screen, regardless of the value of "editor.multiCursorModifier" setting. However, the above workaround means we don't need the Alt+Click anymore.

  12. Tyriar commented on Sep 3, 2020

    @Tyriar
    Contributor

    Alt+Click will still cause junk to fill the screen

    Kenneth Johnson (@securedirective) it's a feature that's sending keys to move the terminal cursor to the position of the mouse cursor. It needs support in whatever program is running in the terminal though which is why you might see the ^[[D printed, we cannot detect this support though. The advice right now is to avoid alt clicking if it doesn't work in the program.

  13. securedirective commented on Sep 3, 2020

    @securedirective

    Daniel Imms (@Tyriar) could you clarify... Is this a feature in Linux that's doing it, and vscode is not able to see that it's happening? Or do you mean this is a feature in vscode to move the cursor, and vscode is not able to tell if the terminal shell supports it?

  14. 41 remaining items

  15. removed
    insiders-released
    on Jan 19, 2021
  16. securedirective commented on Jan 19, 2021

    @securedirective

    Thanks, Daniel Imms (@Tyriar) and Megan Rogge (@meganrogge)! I'm really looking forward to being able to click links in the terminal again.

  17. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Jan 21, 2021
  18. vscode-triage-bot commented on Jan 22, 2021

    @vscode-triage-bot

    This bug has been fixed in to the latest release of VS Code Insiders!

    Alexander Pushkov (@notpushkin), you can help us out by commenting /verified if things are now working as expected.

    If things still don't seem right, please ensure you're on version 4f23418 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

    Happy Coding!

  19. notpushkin commented on Jan 22, 2021

    @notpushkin
    Author

    /verified

  20. locked and limited conversation to collaborators on Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugconfirmedinsiders-releasedterminalverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions