-
Notifications
You must be signed in to change notification settings - Fork 238
Description
The setSize() function in ScreenTerminal https://github.com/jline/jline3/blob/master/builtins/src/main/java/org/jline/builtins/ScreenTerminal.java#L1614 resizes the screen as required.
When the screen height gets increased after being decreased, the function will "reinstate" a few history lines.
Where all the original line are increased in length to be (at least) the proper width with Arrays.copyOf() (https://github.com/jline/jline3/blob/master/builtins/src/main/java/org/jline/builtins/ScreenTerminal.java#L1622), the length of the historic lines is never checked: https://github.com/jline/jline3/blob/master/builtins/src/main/java/org/jline/builtins/ScreenTerminal.java#L1660
As a sizenote:
When the array in increased in size with Array.copyOf(), the rest of the array is initialized with 0's, instead of attr | 0x00000020 (space), so there will be width issues when rendering them as AttributedStrings, as a null char has no width