mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-20 07:24:41 +02:00
Use RenderLines.InRectangle
This commit is contained in:
@@ -235,6 +235,9 @@ type MouseState struct {
|
||||
func (m *MouseState) AddCellRegion(id string, start_x, start_y, end_x, end_y int, on_click ...func(id string) error) *CellRegion {
|
||||
cr := CellRegion{TopLeft: struct{ X, Y int }{start_x, start_y}, BottomRight: struct{ X, Y int }{end_x, end_y}, Id: id, OnClick: on_click}
|
||||
m.regions = append(m.regions, &cr)
|
||||
if m.region_id_map == nil {
|
||||
m.region_id_map = make(map[string][]*CellRegion)
|
||||
}
|
||||
m.region_id_map[id] = append(m.region_id_map[id], &cr)
|
||||
return &cr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user