From dc6aab88b076a35766acc067ddcf68c533a9cd2a Mon Sep 17 00:00:00 2001 From: Anton Skshidlevsky Date: Wed, 17 Aug 2016 10:38:12 +0300 Subject: [PATCH] Fix incorrect mouse position Incorrect mouse position in Midnight Commander --- src/xterm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xterm.js b/src/xterm.js index d2e46074..a0c908a9 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -1325,8 +1325,8 @@ // convert to cols/rows w = self.element.clientWidth; h = self.element.clientHeight; - x = Math.round((x / w) * self.cols); - y = Math.round((y / h) * self.rows); + x = Math.ceil((x / w) * self.cols); + y = Math.ceil((y / h) * self.rows); // be sure to avoid sending // bad positions to the program