to reproduce:
- clone/checkout master at [38bd9b3] (latest as of this writing)
- build it
- add a plugin like this:
local DocView = require "core.docview"
local omr = DocView.on_mouse_released
function DocView:on_mouse_released(b, x, y)
local line, col = self:resolve_screen_position(x, y)
local x2, y2 = self:get_line_screen_position(line, col)
print('x: ' .. x .. ' x2: ' .. x2)
return true
end
- launch lite from terminal
- open a document
- click in the middle of a line and read output
x ~= x2
a small diff can be expected from rounding and a bigger one
can be expected when clicking out to the right of text.
In my tests the diff was over 100 pixels.