docview: fix rounding bug in get_line_text_y_offset

(vertically center text in selection)
This commit is contained in:
Max Rottenkolber 2021-04-04 20:39:58 +02:00
parent 38bd9b3326
commit eb9946862d
1 changed files with 1 additions and 2 deletions

View File

@ -119,9 +119,8 @@ end
function DocView:get_line_text_y_offset()
local lh = self:get_line_height()
local th = self:get_font():get_height()
return (lh - th) / 2
return math.floor(th*config.line_height - th)
end