Helper function for drag and selection event handlers.
(y_coord)
| 188 | auto_scrolling_after_id = None |
| 189 | |
| 190 | def drag_update_selection_and_insert_mark(y_coord): |
| 191 | """Helper function for drag and selection event handlers.""" |
| 192 | lineno = get_lineno(self.text, f"@0,{y_coord}") |
| 193 | a, b = sorted([start_line, lineno]) |
| 194 | self.text.tag_remove("sel", "1.0", "end") |
| 195 | self.text.tag_add("sel", f"{a}.0", f"{b+1}.0") |
| 196 | self.text.mark_set("insert", |
| 197 | f"{lineno if lineno == a else lineno + 1}.0") |
| 198 | |
| 199 | def b1_mousedown_handler(event): |
| 200 | nonlocal start_line |
nothing calls this directly
no test coverage detected