Skip to content

Commit 87cd853

Browse files
djpohlyjonathanslenders
authored andcommitted
Fix off-by-one in FormattedTextControl mouse logic
1 parent bb5c5e6 commit 87cd853

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prompt_toolkit/layout/controls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def mouse_handler(self, mouse_event: MouseEvent) -> "NotImplementedOrNone":
465465
count = 0
466466
for item in fragments:
467467
count += len(item[1])
468-
if count >= xpos:
468+
if count > xpos:
469469
if len(item) >= 3:
470470
# Handler found. Call it.
471471
# (Handler can return NotImplemented, so return

0 commit comments

Comments
 (0)