Skip to content

Commit

Permalink
search menu
Browse files Browse the repository at this point in the history
  • Loading branch information
socketteer committed Mar 14, 2021
1 parent 111e7b3 commit 96fc7c7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ Go to prev bookmark: `a`, `Control-a`

Toggle bookmark: `b`, `Control-b`

Search: `Control-f`


### Edit topology

Expand Down
11 changes: 7 additions & 4 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,17 @@ global edit mode, where all nodes turn into textboxes, but no zooming?
# versioning
* save version each time node is edited
* save origin information (prompt, logprobs, merge or branch)
* undo


# Search
* enter to search
* search chapters
* regex
* case (in)sensitive

# Features

* search (global or by subtree or in ancestry)
* fuzzy?
* search chapter titles, bookmarks
* undo
* "floating" notes
* global or associated with subtree
* bookmark-like tags define subsets of tree (and option to only display/navigate tag)
Expand Down
3 changes: 2 additions & 1 deletion controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def build_menus(self):
("Next Bookmark", "D", None, no_junk_args(self.next_bookmark)),
("Prev Bookmark", "A", None, no_junk_args(self.prev_bookmark)),
("Stochastic walk", "W", None, no_junk_args(self.walk)),
("Change chapter", "Ctrl+Y", None, no_junk_args(self.chapter_dialog)),
("Edit chapter", "Ctrl+Y", None, no_junk_args(self.chapter_dialog)),
("Search", "Ctrl+F", None, no_junk_args(self.search)),

],
"Generation": [
Expand Down
3 changes: 3 additions & 0 deletions view/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ def body(self, master):
self.search_entry.focus_entry()
create_button(master, "Search", self.search)

# return causes freeze whether or not bound
#self.master.bind('<Return>', lambda event=None: self.search)

def search(self):
search_term = self.search_entry.tk_variables.get()
if not search_term:
Expand Down

0 comments on commit 96fc7c7

Please sign in to comment.