diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2021-05-31 21:13:57 +0200 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2021-05-31 21:13:57 +0200 |
commit | 247377861cd1ec7cf607960851648db633927a28 (patch) | |
tree | b70ae3426a4d14c30f45036ab5c5fe51bdd24d0a | |
parent | 3ad5afdfb265c29ac32766ee2023a77c9a4ad978 (diff) |
Add comment to update_size
-rw-r--r-- | saneterm/terminal.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/saneterm/terminal.py b/saneterm/terminal.py index d35ba24..71b9bbc 100644 --- a/saneterm/terminal.py +++ b/saneterm/terminal.py @@ -148,6 +148,12 @@ class Terminal(Gtk.Window): self.scroll.set_policy(hscroll, vscroll) def update_size(self, widget, rect): + # This function allows application running inside the terminal + # to retrieve the window size using the TIOCGWINSZ ioctl. This + # is for example used by ls(1) for multi column output. However, + # since TIOCGWINSZ assumes the terminal be built around a + # character grid we only provide a heuristic implementation. + # PTY must already be initialized if self.pty.master == -1: return |