Use terminal titles for buttons
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user