You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cat this file in the jupyter notebook terminal (availabe at url /terminal/*)
The terminal seems to break the line before the last non-ascii character.
It also seems to be confused about the line number since when I cat this file a couple times, the height of the terminal window is larger than the browser window and the scroll bar appears.
The text was updated successfully, but these errors were encountered:
Again, I think this is an issue with term.js, though hopefully an easier one to fix than the other one you reported. I have checked what gets sent over the websocket, and that is correct '啊啊啊啊啊啊\r\n'.
I'll try to dig into that today. I feel a bit bad just pointing all these issues to term.js without doing anything to help improve it.
OK, I've worked out more or less what's going on here.
First, even with monospace fonts, 啊 is wider than standard Latin characters, at least on my computer. You can see here if this is the same for you:
abcdef
啊啊啊啊啊啊
Since term.js uses the width of a standard character to calculate the number of columns in the terminal, this means that the row ends up wider than it should be, and it gets wrapped to a second line. Because the rest of the line is non-breaking spaces, and possibly because it's a particle rather than a word character, the browser breaks the line before the last 啊, so it appears to go on the start of the next line.
I can fix this by adding the character to the defined wide characters in the isWide() function. But I assume there are other nearby characters that should be treated similarly, and I don't know where the range starts and ends. Anyone who does know, feel free to make a PR adding that to term.js.
Closing here since I've identified it as a term.js issue.
Steps to reproduce
make a file
txt
with contentcat
this file in the jupyter notebook terminal (availabe at url/terminal/*
)The terminal seems to break the line before the last non-ascii character.
It also seems to be confused about the line number since when I cat this file a couple times, the height of the terminal window is larger than the browser window and the scroll bar appears.
The text was updated successfully, but these errors were encountered: