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

sindresorhus/pure:master displays wrong in tmux #893

Closed
Hello71 opened this issue May 30, 2017 · 3 comments
Closed

sindresorhus/pure:master displays wrong in tmux #893

Hello71 opened this issue May 30, 2017 · 3 comments

Comments

@Hello71
Copy link

Hello71 commented May 30, 2017

steps to reproduce:

  1. install specified software
  2. open new window in tmux
  3. press enter until screen must "scroll"
  4. run commands

expected results:
prompt is displayed "tiled" vertically, output is displayed between prompts

actual results:
prompt is offset few lines, overwrites output of previous command:

~ master* alex@pink
❯ 

~ master* alex@pink
❯ 

~ master* alex@pink
~ master* alex@pink
❯ 

/tmp/test alex@pink
❯ 

  ll
total 0
-rw------- 1 alex alex 0 May 30 15:57 1
-rw------- 1 alex alex 0 May 30 15:57 10
-rw------- 1 alex alex 0 May 30 15:57 2
-rw------- 1 alex alex 0 May 30 15:57 3
-rw------- 1 alex alex 0 May 30 15:57 4
-rw------- 1 alex alex 0 May 30 15:57 5
-rw------- 1 alex alex 0 May 30 15:57 6
-rw------- 1 alex alex 0 May 30 15:57 7
-rw------- 1 alex alex 0 May 30 15:57 8
/tmp/test alex@pinklex 0 May 30 15:57 9
❯ 



additional information:
mosh 1.3.0 on both
tmux 2.5
zsh 5.3.1
bad commit sindresorhus/pure:4cdd0cf, probably related to zle reset-prompt command. I didn't chase down what exactly this command does.

@cgull
Copy link
Member

cgull commented May 30, 2017

This doesn't look quite like screenshots at https://github.com/sindresorhus/pure. Are characters missing on the screen for you?

If so, that's a fairly good sign that you're having Unicode compatibility problems. Mosh relies on the system libc wcwidth() function to decide whether characters are wide or narrow, and most libc implementations lag far far behind Unicode releases. #234 has lots more discussion on this.

@Hello71
Copy link
Author

Hello71 commented May 30, 2017

sample output in ssh (and mosh after switching windows and back again):

~ master* alex@pink
❯ 

~ master* alex@pink
❯ 

~ master* alex@pink
❯ cd /tmp/test

/tmp/test alex@pink
❯ touch {1..10}

/tmp/test alex@pink
❯ ll
total 0
-rw------- 1 alex alex 0 May 30 22:14 1
-rw------- 1 alex alex 0 May 30 22:14 10
-rw------- 1 alex alex 0 May 30 22:14 2
-rw------- 1 alex alex 0 May 30 22:14 3
-rw------- 1 alex alex 0 May 30 22:14 4
-rw------- 1 alex alex 0 May 30 22:14 5
-rw------- 1 alex alex 0 May 30 22:14 6
-rw------- 1 alex alex 0 May 30 22:14 7
-rw------- 1 alex alex 0 May 30 22:14 8
-rw------- 1 alex alex 0 May 30 22:14 9

/tmp/test alex@pink
❯ 
[0] 0:zsh*                                                                                                                                                         "(pink) /tmp/test" 22:23 30-May-17

mosh's output of this display:

~ master* alex@pink
❯ 

~ master* alex@pink
~ master* alex@pink
❯ 

/tmp/test alex@pink
❯ 

/tmp/test alex@pink
❯ 
  
  ll
total 0
-rw------- 1 alex alex 0 May 30 22:14 1
-rw------- 1 alex alex 0 May 30 22:14 10
-rw------- 1 alex alex 0 May 30 22:14 2
-rw------- 1 alex alex 0 May 30 22:14 3
-rw------- 1 alex alex 0 May 30 22:14 4
-rw------- 1 alex alex 0 May 30 22:14 5
-rw------- 1 alex alex 0 May 30 22:14 6
-rw------- 1 alex alex 0 May 30 22:14 7
-rw------- 1 alex alex 0 May 30 22:14 8
/tmp/test alex@pinklex 0 May 30 22:14 9
❯ 


[0] 0:zsh*                                                                                                                                                         "(pink) /tmp/test" 22:23 30-May-17

new lines exactly as displayed, i.e. mosh shows two blank lines before the tmux "footer"

@Hello71
Copy link
Author

Hello71 commented Jun 2, 2017

seems to be fixed in master

@Hello71 Hello71 closed this as completed Jun 2, 2017
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

2 participants