Recalculate the terminal size on SIGWINCH to make sure we take in to the account the new real estate. --- src/journal/journalctl.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 8e52dd5..a04bb05 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -29,6 +29,7 @@ #include <sys/poll.h> #include <time.h> #include <getopt.h> +#include <signal.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <linux/fs.h> @@ -78,6 +79,10 @@ static enum { ACTION_DISK_USAGE, } arg_action = ACTION_SHOW; +static recalc_columns(int _unused_ signum) { + columns_uncached(); +} + static int help(void) { printf("%s [OPTIONS...] [MATCH]\n\n" @@ -175,6 +180,7 @@ static int parse_argv(int argc, char *argv[]) { case 'f': arg_follow = true; + signal(SIGWINCH, recalc_columns); break; case 'o': -- 1.7.12 _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel