From 01bf29b307e39d6a7141c93f94715da9314d75e5 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 17 Feb 2014 01:19:13 +0100 Subject: ext.img_display: fix misplacement of image in previous commit Thanks to majutsushi, see https://github.com/hut/ranger/issues/109 --- ranger/ext/img_display.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ranger/ext/img_display.py b/ranger/ext/img_display.py index 77f8acaa..d470fb24 100644 --- a/ranger/ext/img_display.py +++ b/ranger/ext/img_display.py @@ -125,5 +125,8 @@ def _get_font_dimensions(): output, _ = process.communicate() output = output.split() xpixels, ypixels = int(output[0]), int(output[1]) + # adjust for misplacement + xpixels += 2 + ypixels += 2 return (xpixels // cols), (ypixels // rows) -- cgit 1.4.1-2-gfad0