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
Hello, I am having issues resizing a terminal that provides a status line. The content is messed up and I haven't found any possible way to overcome this issue (Windows).
I have modified the Java example provided, by adding the status line border and another line, as follows:
while (true) {
try {
Status status = Status.getStatus(reader.getTerminal());
status.setBorder(true);
counter++;
status.update(Arrays.asList(
new AttributedStringBuilder().append("counter: " + counter)
.toAttributedString(),
new AttributedStringBuilder()
.append("Some te sdfg sd ewrt sdg sdg ryt rtsy rsty tfhxt")
.toAttributedString()));
((LineReaderImpl) reader).redisplay();
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
As you can see from the attached screenshots, all appears ok if I don't resize the terminal:
However, as soon as I maximise or stretch it, the content is messed up:
The same issue appears also if I am using my own instance of the status line (i.e., without the factory method).
Could you please help?
The text was updated successfully, but these errors were encountered:
After a resize, you need to redraw the terminal.
If you're reading a line, the line reader should already redisplay the prompt and the line being edited. For the line above, the terminal won't do anything because they are not in control.
If you're using a full-size terminal applications (such as nano, less, etc...), then you can catch the WINCH signal and redraw the terminal.
Hello, I am having issues resizing a terminal that provides a status line. The content is messed up and I haven't found any possible way to overcome this issue (Windows).
I have modified the Java example provided, by adding the status line border and another line, as follows:
As you can see from the attached screenshots, all appears ok if I don't resize the terminal:
However, as soon as I maximise or stretch it, the content is messed up:
The same issue appears also if I am using my own instance of the status line (i.e., without the factory method).
Could you please help?
The text was updated successfully, but these errors were encountered: