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

Lines containing unicode characters in integrated terminal differ in height #8219

Closed
Tyriar opened this issue Jun 27, 2016 · 18 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug terminal General terminal issues that don't fall under another label
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jun 27, 2016

See xtermjs/xterm.js#149, the fix will probably be added to the custom style element. The main thing to consider is how to allow line height customization and get the lines aligned correctly at the same time.

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal General terminal issues that don't fall under another label labels Jun 27, 2016
@Tyriar Tyriar added this to the July 2016 milestone Jun 27, 2016
@Tyriar Tyriar self-assigned this Jun 27, 2016
@Tyriar
Copy link
Member Author

Tyriar commented Jul 5, 2016

Upstream issue: xtermjs/xterm.js#149

@Tyriar Tyriar added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jul 5, 2016
@Tyriar Tyriar closed this as completed in f46136d Jul 16, 2016
@Tyriar Tyriar removed the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jul 16, 2016
@jrieken jrieken added the verified Verification succeeded label Jul 28, 2016
@wyntau
Copy link

wyntau commented Aug 8, 2016

@Tyriar Excuse me, was this problem fixed in 1.4.0 stable?

I downloaded the latest 1.4.0 stable, but still have this problem

image

the console top is cut in vscode terminal, and the PROMPT is cut to two lines

@wyntau
Copy link

wyntau commented Aug 8, 2016

And, different terminal height cut different height console top

c

@wyntau
Copy link

wyntau commented Aug 8, 2016

The last, If I was on the bottom of terminal, when I input or click, the console output will scroll up automatically.

Also, the ls output is firstly correct(no new line for every file), then it become uncorrect(drwxrw-rw- goto next line)

d

@wyntau
Copy link

wyntau commented Aug 8, 2016

Oh!

I found the problem. I extract the new vscode(1.4.0) to /Application to override the old one( version 1.3.1). So these problems is not solved.

Just now, I completely deleted old vscode in my /Application folder, then extract the new vscode into /Application, the console top is not cut!

I think the problem is OS X not removed the old files completely when I select override the old one with new vscode. so the vscode I used is a version mixed the files in 1.3.1 and 1.4.0.

Maybe some users like me should remove old vscode completely to solve these problems.

=== Edit again

The real problem is the font I used. If I used default fonts "editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace" the console top is not cut. But if I use Source Code Pro, the console top will be cut. The font I used is https://github.com/adobe-fonts/source-code-pro

the terminal scroll up automatically problem will occur even I use the default font. But other problems will not occur when I not use the Source Code Pro

@Tyriar
Copy link
Member Author

Tyriar commented Aug 8, 2016

@treri it was supposed to be fixed in v1.4.0 yes, do you have a custom line height set by chance in settings?

@wyntau
Copy link

wyntau commented Aug 8, 2016

@Tyriar no, I did not set line-height in my setting

my setting is below, the last terminal.integrated.fontFamily was added today.

// Place your settings in this file to overwrite the default settings
{
  //-------- Editor configuration --------
  "editor.fontFamily": "Source Code Pro",
  "editor.fontSize": 13,
  "editor.rulers": [80, 100],
  "editor.tabSize": 2,
  "editor.wrappingColumn": 0,
  "editor.renderIndentGuides": true,
  "diffEditor.ignoreTrimWhitespace": false,

  "window.reopenFolders": "none",

  "projectManager.openInNewWindow": false,

  "terminal.integrated.fontFamily": "Menlo, Monaco, 'Courier New', monospace"
}

@Tyriar
Copy link
Member Author

Tyriar commented Aug 8, 2016

@treri thanks! Also can you copy special characters in your prompt and paste them here?

@wyntau
Copy link

wyntau commented Aug 9, 2016

@Tyriar
Sorry, I did not know what the special characters are. I just use oh-my-zsh default theme robbyrussell

The theme file and prompt are https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/robbyrussell.zsh-theme

@Tyriar
Copy link
Member Author

Tyriar commented Aug 9, 2016

I mean the arrow and cross characters in your prompt

@wyntau
Copy link

wyntau commented Aug 9, 2016

Is this?

@Tyriar Tyriar modified the milestones: August 2016, July 2016 Aug 9, 2016
@Tyriar Tyriar reopened this Aug 9, 2016
@Tyriar Tyriar removed the verified Verification succeeded label Aug 9, 2016
@eladcandroid
Copy link

I'm using VSCode 1.4 and have the same problem like @treri described with oh-my-zsh default theme.

@Tyriar
Copy link
Member Author

Tyriar commented Aug 12, 2016

@treri @eladcandroid do you mind testing if this is still happening in Insiders? Stuff to do with line height was changed with the introduction of the scroll bar so it might have been fixed.

@Tyriar Tyriar added the info-needed Issue requires more information from poster label Aug 12, 2016
@Tyriar Tyriar modified the milestones: Backlog, August 2016 Aug 12, 2016
@wyntau
Copy link

wyntau commented Aug 13, 2016

@Tyriar
I tested the insider version. the console problem have been fixed. but I can't scroll to console bottom. I can only goto console bottom when I input something. But If I press enter, the console output will goto top again.

And I can't see the scroll bar?

insider2

@Tyriar
Copy link
Member Author

Tyriar commented Aug 13, 2016

Hmm, I think oh-my-zsh may be using the application keypad mode then which is what i was using to turn off the scroll bar, otherwise it would show up in programs like vim.

@wyntau
Copy link

wyntau commented Aug 14, 2016

@Tyriar I will use bash to test again

@wyntau
Copy link

wyntau commented Aug 14, 2016

@Tyriar
bash have no problem
And I found the problem is oh-my-zsh/lib/key-bindings.zsh#L14

# Make sure that the terminal is in application mode when zle is active, since
# only then values from $terminfo are valid
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
  function zle-line-init() {
    echoti smkx
  }
  function zle-line-finish() {
    echoti rmkx
  }
  zle -N zle-line-init # By treri: If I comment out this line, my terminal works well
  zle -N zle-line-finish
fi

@Tyriar
Copy link
Member Author

Tyriar commented Apr 20, 2017

I believe this issue is fixed. The situation will improve further after #18588 is resoled

@Tyriar Tyriar closed this as completed Apr 20, 2017
@Tyriar Tyriar removed the info-needed Issue requires more information from poster label Apr 20, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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 terminal General terminal issues that don't fall under another label
Projects
None yet
Development

No branches or pull requests

4 participants