From 3246f46de6879f1c2a0fd056bccda1a4a0400388 Mon Sep 17 00:00:00 2001 From: Graham Inggs Date: Sat, 17 Feb 2018 19:21:52 +0200 Subject: Fix issue with small terminals --- debian/changelog | 1 + debian/patches/fix-small-terminals.patch | 18 ++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 20 insertions(+) create mode 100644 debian/patches/fix-small-terminals.patch diff --git a/debian/changelog b/debian/changelog index b39ee85..1b36053 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ htop (2.1.0-3) UNRELEASED; urgency=medium * Update Daniel Lange's email address * Add debian/clean to remove autogenerated headers * Refresh debian/patches/601-openvz-new-ctid-vpid.patch + * Fix issue with small terminals (Closes: #889693) -- Graham Inggs Mon, 05 Feb 2018 18:07:57 +0000 diff --git a/debian/patches/fix-small-terminals.patch b/debian/patches/fix-small-terminals.patch new file mode 100644 index 0000000..4f03732 --- /dev/null +++ b/debian/patches/fix-small-terminals.patch @@ -0,0 +1,18 @@ +Description: Fix issue with small terminals +Bug: https://github.com/hishamhm/htop/issues/733 +Bug-Debian: https://bugs.debian.org/889693 +Origin: upstream,https://github.com/hishamhm/htop/commit/b544c22c72613d561180738d8c31c97712b3c0ef +Author: Hisham Muhammad +Last-Update: 2018-02-13 + +--- a/Meter.c ++++ b/Meter.c +@@ -287,7 +287,7 @@ + + int blockSizes[10]; + +- xSnprintf(bar, w + 1, "%*s", w, buffer); ++ xSnprintf(bar, w + 1, "%*.*s", w, w, buffer); + + // First draw in the bar[] buffer... + int offset = 0; diff --git a/debian/patches/series b/debian/patches/series index a437421..7b9311f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 601-openvz-new-ctid-vpid.patch +fix-small-terminals.patch -- cgit v1.2.3