Checkpoint commit, almost have the initial search research done. Don't forget to remove test keymap
This commit is contained in:
parent
efaf7e25f4
commit
f62b69adb4
3 changed files with 101 additions and 24 deletions
|
@ -40,6 +40,7 @@ actions!(
|
|||
Copy,
|
||||
Paste,
|
||||
ShowCharacterPalette,
|
||||
SearchTest
|
||||
]
|
||||
);
|
||||
impl_internal_actions!(project_panel, [DeployContextMenu]);
|
||||
|
@ -57,6 +58,8 @@ pub fn init(cx: &mut MutableAppContext) {
|
|||
cx.add_action(TerminalView::paste);
|
||||
cx.add_action(TerminalView::clear);
|
||||
cx.add_action(TerminalView::show_character_palette);
|
||||
|
||||
cx.add_action(TerminalView::test_search);
|
||||
}
|
||||
|
||||
///A terminal view, maintains the PTY's file handles and communicates with the terminal
|
||||
|
@ -159,6 +162,14 @@ impl TerminalView {
|
|||
}
|
||||
}
|
||||
|
||||
fn test_search(&mut self, _: &SearchTest, cx: &mut ViewContext<Self>) {
|
||||
let search_string = "ttys";
|
||||
self.terminal.update(cx, |term, _| {
|
||||
term.search(search_string);
|
||||
});
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
fn clear(&mut self, _: &Clear, cx: &mut ViewContext<Self>) {
|
||||
self.terminal.update(cx, |term, _| term.clear());
|
||||
cx.notify();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue