T22: Edit's Copy, Paste and Select All are Ely's text input actions, which Ely a2cb531 exports and the terminal handles too, so the menu reaches find and every field; Select All counts a space under a combining mark as a character; comments cut to one short line; the Ely pin moves to a2cb531; AGENTS.md says gpui draws a shot window only while macOS shows it
This commit is contained in:
11 files changed
+56
-39
No files matched your search
+5
-7
@@ -1,11 +1,9 @@
|
||||
use ely_gpui_component::forms::{Copy, Paste, SelectAll};
|
||||
use gpui::{App, InteractiveElement, KeyBinding, Menu, MenuItem, OsAction, actions};
|
||||
|
||||
use crate::{
|
||||
settings::window::OpenSettings,
|
||||
term::{
|
||||
input::{Copy, Find, Paste, SelectAll},
|
||||
zoom,
|
||||
},
|
||||
term::{input::Find, zoom},
|
||||
workspace::{CloseSession, NewSession, TogglePanel, ToggleSessions},
|
||||
};
|
||||
|
||||
@@ -14,7 +12,7 @@ actions!(
|
||||
[Quit, Bigger, Smaller, ResetSize, Minimize, Zoom]
|
||||
);
|
||||
|
||||
/// The menu bar the PRD lists; macOS draws it and names the first menu after the app.
|
||||
/// The PRD's menu bar.
|
||||
pub fn menus() -> Vec<Menu> {
|
||||
let menu = |name: &str, items| Menu {
|
||||
name: name.to_string().into(),
|
||||
@@ -69,7 +67,7 @@ pub fn menus() -> Vec<Menu> {
|
||||
]
|
||||
}
|
||||
|
||||
/// Ghostty's keys for Quit and the font's size, Cmd on macOS and Ctrl elsewhere, Cmd-M to minimize; what they do; then the menus, which show the keys bound by now.
|
||||
/// Binds app commands before building their menus.
|
||||
pub fn init(cx: &mut App) {
|
||||
let (quit, modifier) = if cfg!(target_os = "macos") {
|
||||
("cmd-q", "cmd")
|
||||
@@ -97,7 +95,7 @@ pub fn init(cx: &mut App) {
|
||||
cx.set_menus(menus());
|
||||
}
|
||||
|
||||
/// Minimize and Zoom on a window's root: only a window answers them.
|
||||
/// Minimize and Zoom, which only a window answers.
|
||||
pub fn window_actions<E: InteractiveElement>(root: E) -> E {
|
||||
root.on_action(|_: &Minimize, window, _| {
|
||||
log::info!("window: minimized");
|
||||
|
||||
Reference in new issue
Block a user