more precise click-handling in word-wrapping lines
This commit is contained in:
parent
23418d4b6a
commit
2b1fc7746d
4
move.lua
4
move.lua
|
@ -557,7 +557,9 @@ function Text.get_rect(editor, loc)
|
|||
if char:match('%s') then
|
||||
if Text.line_wrap_at_word_boundary(editor, editor.left + x, line.data, pos) then
|
||||
table.insert(curr_screen_line,
|
||||
{x=x, y=y, dx=editor.width-x, dy=editor.line_height, pos=pos, data=char, show_cursor=true}) -- char+filler
|
||||
{x=x, y=y, dx=w, dy=editor.line_height, pos=pos, data=char, show_cursor=true}) -- char
|
||||
table.insert(curr_screen_line,
|
||||
{x=x+w, y=y, dx=editor.width-x-w, dy=editor.line_height, pos=pos+1}) -- filler
|
||||
table.insert(screen_lines,
|
||||
{x=0, y=y, dx=editor.width, dy=editor.line_height,
|
||||
pos=spos, dpos=pos-spos+1, char_rects=curr_screen_line})
|
||||
|
|
Loading…
Reference in New Issue