rxi / lite

A lightweight text editor written in Lua
MIT License
7.39k stars 350 forks source link

docview: fix rounding bug in get_line_text_y_offset #275

Open eugeneia opened 3 years ago

eugeneia commented 3 years ago

Vertically center text in selection. get_line_height already rounds down and that made the text seem “stuck to the top“ in selections. Rounding down after calculating the offset using doubles fixes this for me.

Cheers! As always a bliss to play with lite!