docview: fix rounding bug in get_line_text_y_offset
(vertically center text in selection)
This commit is contained in:
parent
38bd9b3326
commit
eb9946862d
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue