Skip to content

Commit ffa4b3c

Browse files
committed
BBEdit sidebar workarounds.
1 parent f276af1 commit ffa4b3c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

core/dynamic_ui/ui_mac.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ def ui_element_select(element):
175175
element.perform("AXPress")
176176
if element.AXSelected:
177177
return
178+
# BBEdit
179+
for child in element.children:
180+
if "AXPick" in child.actions:
181+
child.perform("AXPick")
182+
return
178183
if (
179184
parent.AXRole == "AXList"
180185
and getattr(parent, "AXSubrole", None) == "AXSectionList"
@@ -466,6 +471,8 @@ def sidebar_rows():
466471
def sidebar_selected_rows():
467472
for child in potential_sidebars():
468473
selected_rows = getattr(child, "AXSelectedChildren", None)
474+
if selected_rows is None:
475+
selected_rows = getattr(child, "AXSelectedRows", None)
469476
if selected_rows is None and (rows := list_rows(child, True)):
470477
selected_rows = [row for row in rows if getattr(row, "AXSelected", None)]
471478
if selected_rows:

0 commit comments

Comments
 (0)