mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-04 20:24:23 +02:00
Request redraw after write if terminal visible
Requests a redraw after writing to terminal if it is visible, otherwise terminal will not be updated if there are no other redraw requests. Fixes #53.
This commit is contained in:
parent
9896a362c3
commit
041e7a445f
3 changed files with 7 additions and 15 deletions
|
@ -83,6 +83,10 @@ func write(data) -> void:
|
|||
# Will be cleared when _flush() is called after VisualServer emits the "frame_pre_draw" signal.
|
||||
_buffer.push_back(data)
|
||||
|
||||
# Ensure redraw is requested if terminal is visible.
|
||||
if visible:
|
||||
update()
|
||||
|
||||
|
||||
func _flush():
|
||||
for data in _buffer:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue