Terminal-clearing bug

terminal

#1

Hi,

There’s this strange, and quite annoying, behavior of the terminal, when you try clearing it (e.g., by hitting Ctrl + L), sometimes remnants of a line (or even a whole line) still appears up top. As shown, this can be reproduced by resizing then clearing:

Been trying to figure out the cause, and possibly fix and PR the core to save you time and efforts, but it’s taking me quite some time as, unfortunately, I’m not yet much familiar with the terminal plugin, and most code there doesn’t appear to be particularly well-documented.

Any idea what might be the cause? Still willing to try fixing, so would be great if you even just point me where to look!

Thanks in advance!


#2

this is a rather tricky issue, since terminal needs to display fractional number of lines to fill whole available space, and it tries to align lines with either the top or the bottom of the screen based on cursor position. The code for this is in https://github.com/c9/core/blob/master/plugins/c9.ide.terminal/aceterm/aceterm.js#L202 and https://github.com/c9/core/blob/master/plugins/c9.ide.terminal/aceterm/aceterm.js#L44


#3

I don’t know if it is related to this issue, but I am sometimes having the problem that the terminal hangs; only displaying 2 lines, and can not be dragged any more. Only can do a ‘full screen’, so not half etc…

The browser is Google Chrome 53.0.2785.143 m (64-bit)