Skip to content

Commit

Permalink
fix: global search goto line #160 (@nfoert)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlin7 committed Jan 1, 2024
1 parent d71f765 commit c0a6f1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions biscuit/core/components/utils/buttonsentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def __init__(self, master, hint="", buttons=(), textvariable=None, *args, **kwar
self.column = 1
self.add_buttons(buttons)

def add_button(self, icon, event=lambda _: None):
b=IconButton(self, icon, event)
def add_button(self, icon, event=lambda _: None, icon2):
b=IconButton(self, icon, event, icon2)
b.grid(row=0, column=self.column, sticky='')
b.config(**self.base.theme.utils.buttonsentry.button)
self.column += 1
Expand Down
4 changes: 1 addition & 3 deletions biscuit/core/components/views/sidebar/search/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ def click(self, _) -> None:
item = self.treeview.focus()

try: # Click on child item
self.base.open_editor(self.treeview.item(item)["tags"][0])
# TODO: Seems to only scroll part of the time
self.base.editorsmanager.active_editor.content.goto_line(int(self.treeview.item(item)["tags"][1]))
self.base.goto_location(self.treeview.item(item)["tags"][0], str(float(self.treeview.item(item)["tags"][1])))

except IndexError: # Click on parent item
print("You clicked on a parent item")
Expand Down

0 comments on commit c0a6f1f

Please sign in to comment.