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

There is a problem with VScode line wrapping #2348

Closed
MenbinX opened this issue Jun 17, 2023 · 7 comments
Closed

There is a problem with VScode line wrapping #2348

MenbinX opened this issue Jun 17, 2023 · 7 comments

Comments

@MenbinX
Copy link

MenbinX commented Jun 17, 2023

When I enter the carriage return, the symbol "/" appears on the next line, and when I enter at the bottom, the cursor moves to the next line.
image
image

  • Windows10,22H2
  • git-bash
  • VScode1.78.2
@romkatv
Copy link
Owner

romkatv commented Jun 17, 2023

Try this:

  1. Add the following at the very top of ~/.zshrc:
    PS1=$'\uF17A '
    RPS1=$'\uF17A'
    return
  2. Restart your terminal.

Does this work fine?

@MenbinX
Copy link
Author

MenbinX commented Jun 18, 2023

This work fine. Thanks

@romkatv
Copy link
Owner

romkatv commented Jun 19, 2023

Then I don't know why rendering doesn't work as expected. Sorry. If you find out, please post an update.

@romkatv romkatv closed this as completed Jun 25, 2023
@huankong233
Copy link

is the return needed?

why i add it in my ~/.zshrc

then it running in a wrong way

image

I delete the return

It appears like this:

image

sometimes there is a \ sometimes there is not

enviroment:

  • Windows10,22H2
  • git-bash
  • VScode1.79.2

@markspl
Copy link

markspl commented Nov 22, 2023

Hi! I noticed the same issue on my VSCode internal terminal (no WSL setup).

Environment

  • Windows: Version 10.0.19045 Build 19045
  • VSCode :1.84.2
  • git: 2.43.0.windows.1
  • zsh: 5.9 (x86_64-pc-msys
  • oh-my-zsh: commit 18073af (Nov 22th)

Default terminal profile on VSCode terminal: Git Bash

zsh is "installed" on git-bash, and oh-my-zsh was installed with basic install way (curl install.sh command).

I can't repeat the issue on Windows Terminal (git-bash)

What I've tested:

  • Different p10k configure styles
    • with and without empty rows
    • with and without compact rows
    • different other style combinations
  • disabling plugins "git" and "zsh-autosuggestions"

I noticed, that sometimes after opening another zsh session inside zsh, and exit, it doesn't show " \ " symbol any more on the main session.

Plus, sometimes I can see how it flashes the symbol quickly on screen.

For example:

❯ ls            <-- shows " \ "
❯ bash
❯ bash
❯ ls
❯ ls
❯ ls
❯ bye
❯ ls             <-- doesn't show anymore " \ "
❯ ls                   .  
❯ ls                   .
❯ ls                   .
❯ ls                   .
❯ ls                   .
❯ bye                  .
❯ ls                   . ( top-most session ) 
❯ ls                   .
❯ ls                   .
❯ ls                   .
❯ ls                   .
                 <-- still shows empty row correctly without " \ "
~/testing                                                                                                                                                                                                                                                      20:23:43 
❯

@jathek
Copy link

jathek commented Feb 28, 2024

I was able to fix this on my system by disabling VS Code's terminal.integrated.windowsEnableConpty setting.

The actual issue is from ~\.oh-my-zsh\lib\termsupport.zsh, in the omz_termsupport_cwd function at the bottom of the file. The printf line somehow causes issues in VS Code when ConPTY is enabled.

@BestLemoon
Copy link

I was able to fix this on my system by disabling VS Code's terminal.integrated.windowsEnableConpty setting.

The actual issue is from ~\.oh-my-zsh\lib\termsupport.zsh, in the omz_termsupport_cwd function at the bottom of the file. The printf line somehow causes issues in VS Code when ConPTY is enabled.

Thanks for the solution. It works quite well in ASCII mode, but when I selected Unicode mode, it seemed that always shows two command lines. Quite strange, so I chose ASCII mode now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants