Fix off by one in hyperlink extent

This commit is contained in:
Kovid Goyal
2024-05-07 17:12:37 +05:30
parent 27a2e3c488
commit f26b7533c6

View File

@@ -63,7 +63,10 @@ func (r RenderLines) InRectangle(
if hyperlink_state.action == "" {
return false
}
mouse_state.AddCellRegion(hyperlink_state.action, hyperlink_state.start_x, hyperlink_state.start_y, x, y, on_click...)
if y == hyperlink_state.start_y && x <= hyperlink_state.start_x {
return false
}
mouse_state.AddCellRegion(hyperlink_state.action, hyperlink_state.start_x, hyperlink_state.start_y, max(0, x-1), y, on_click...)
hyperlink_state.action = ``
return true
}