diff options
| author | Mark Jaquith <mark@jaquith.me> | 2026-09-14 15:47:53 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-14 21:47:53 +0200 |
| commit | b0f21ed2cb85613050b794bf6c78a7c367a94e0d (patch) | |
| tree | 25c14e09338f5300bedbc8131aa23fab3d37add9 /src/client/shell/state.rs | |
| parent | d8b36691d10c6055293ad45324b22af8b8f570e5 (diff) | |
feat: add cursor-based editing to text inputs (#3698)
* feat: add cursor-based editing to text inputs
refs #1803
* fix: preserve dialog actions with associated text
refs #1803
* refactor: simplify text editor outcomes and tests
refs #1803
---------
Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com>
Diffstat (limited to 'src/client/shell/state.rs')
| -rw-r--r-- | src/client/shell/state.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/client/shell/state.rs b/src/client/shell/state.rs index 04e87169..f61295c8 100644 --- a/src/client/shell/state.rs +++ b/src/client/shell/state.rs @@ -372,8 +372,7 @@ pub(super) enum ClientRenameTarget { #[derive(Debug)] pub(super) struct ClientRenameOverlay { pub(super) title: &'static str, - pub(super) input: String, - pub(super) replace_on_type: bool, + pub(super) input: TextEditor, pub(super) target: ClientRenameTarget, } @@ -417,7 +416,7 @@ pub(super) struct ClientNavigatorRow { #[derive(Debug)] pub(super) struct ClientNavigatorOverlay { - pub(super) query: String, + pub(super) query: TextEditor, pub(super) search_focused: bool, pub(super) selected: Option<ClientNavigatorTarget>, pub(super) scroll: usize, @@ -427,7 +426,7 @@ pub(super) struct ClientNavigatorOverlay { #[derive(Debug)] pub(super) struct ClientHelpOverlay { - pub(super) query: String, + pub(super) query: TextEditor, pub(super) search_focused: bool, pub(super) scroll: usize, } @@ -482,9 +481,8 @@ pub(super) struct ClientSettingsOverlay { pub(super) struct ClientWorktreeCreateOverlay { pub(super) source_workspace_id: String, pub(super) repo_name: String, - pub(super) branch: String, + pub(super) branch: TextEditor, pub(super) checkout_path: String, - pub(super) replace_on_type: bool, pub(super) error: Option<String>, pub(super) creating: bool, } @@ -532,7 +530,7 @@ pub(super) struct ClientWorktreeOpenOverlay { pub(super) source_workspace_id: String, pub(super) entries: Vec<ClientWorktreeOpenEntry>, pub(super) selected: usize, - pub(super) query: String, + pub(super) query: TextEditor, pub(super) search_focused: bool, pub(super) error: Option<String>, pub(super) opening: bool, @@ -850,7 +848,7 @@ pub(super) enum ClientCopySelection { #[derive(Clone, Debug, PartialEq, Eq)] pub(super) struct ClientCopySearchPrompt { pub(super) direction: crate::api::schema::PaneCopySearchDirection, - pub(super) query: String, + pub(super) query: TextEditor, } #[derive(Clone, Debug, PartialEq, Eq)] |
