Skip to content

Commit

Permalink
Fixed TextInput visual selection bugs while scrolling (#7618)
Browse files Browse the repository at this point in the history
Fixed TextInput visual selection bugs in multiline mode while scrolling vertically.
Removed unecessary operation.
  • Loading branch information
DexerBR committed Sep 13, 2021
1 parent 92ff508 commit 9152bc8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kivy/uix/textinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -2334,9 +2334,9 @@ def _update_graphics_selection(self):
islice(
rects,
max(selection_start_row, first_visible_line),
min(selection_end_row + 1, last_visible_line),
min(selection_end_row + 1, last_visible_line - 1),
),
start=selection_start_row
start=max(selection_start_row, first_visible_line)
):
draw_selection(
rect.pos,
Expand All @@ -2355,7 +2355,6 @@ def _update_graphics_selection(self):
canvas_add,
selection_color
)
y -= dy
self._position_handles('both')

def _draw_selection(
Expand Down

0 comments on commit 9152bc8

Please sign in to comment.