Use terminal titles for buttons
This commit is contained in:
parent
c80942ea00
commit
0a3f0c5252
3 changed files with 39 additions and 36 deletions
|
@ -120,10 +120,11 @@ impl TerminalButton {
|
|||
let local_terminal_handles = project.local_terminal_handles();
|
||||
|
||||
for local_terminal_handle in local_terminal_handles {
|
||||
if let Some(_) = local_terminal_handle.upgrade(cx) {
|
||||
// TODO: Obtain the actual terminal "name" and put it in the menu
|
||||
if let Some(terminal) = local_terminal_handle.upgrade(cx) {
|
||||
let title = terminal.read(cx).title();
|
||||
|
||||
// TODO: Replace the `NewTerminal` action with an action that instead focuses the selected terminal
|
||||
menu_options.push(ContextMenuItem::item("Terminal", NewTerminal))
|
||||
menu_options.push(ContextMenuItem::item(title, NewTerminal))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue