mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-08-26 03:26:42 +00:00
16 lines
343 B
Markdown
16 lines
343 B
Markdown
![]() |
---
|
||
|
module: [kind=event] term_resize
|
||
|
---
|
||
|
|
||
|
The @{term_resize} event is fired when the main terminal is resized, mainly when a new tab is opened or closed in @{multishell}.
|
||
|
|
||
|
## Example
|
||
|
Prints :
|
||
|
```lua
|
||
|
while true do
|
||
|
os.pullEvent("term_resize")
|
||
|
local w, h = term.getSize()
|
||
|
print("The term was resized to (" .. w .. ", " .. h .. ")")
|
||
|
end
|
||
|
```
|