diff options
| author | Jonah Caplan <jonahcaplan@gmail.com> | 2021-03-08 04:06:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-08 10:06:23 +0100 |
| commit | 44b0246e91ae65b09f3e2d9b111772a6b093135b (patch) | |
| tree | c1a422e0f9ffb02cb978ae4d5bb68018deb2a998 /src/common/errors.rs | |
| parent | New tab styling (#216) (diff) | |
| download | sl0ppij-44b0246e91ae65b09f3e2d9b111772a6b093135b.tar.gz sl0ppij-44b0246e91ae65b09f3e2d9b111772a6b093135b.tar.xz sl0ppij-44b0246e91ae65b09f3e2d9b111772a6b093135b.zip | |
feat(tabs): add ability to set tab name (#212)
* send all tabs in vec
* works but no input filtering
* add event types
* add event handler for tab events
* fmt fixups
* update tab name in place, and escape rename works
* rename handle_tab_event handle_tab_rename_keypress
* handle empty new_name when renaming
* fix(tabs): pad active tab name too
* fix(tabs): report proper length
* fix(tabs): always render active tab
* style(fmt): rustfmt
Co-authored-by: Aram Drevekenin <aram@poor.dev>
Diffstat (limited to 'src/common/errors.rs')
| -rw-r--r-- | src/common/errors.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/errors.rs b/src/common/errors.rs index 03aec714..df741629 100644 --- a/src/common/errors.rs +++ b/src/common/errors.rs @@ -198,6 +198,7 @@ pub enum ScreenContext { SwitchTabPrev, CloseTab, GoToTab, + UpdateTabName, } impl From<&ScreenInstruction> for ScreenContext { @@ -236,6 +237,7 @@ impl From<&ScreenInstruction> for ScreenContext { ScreenInstruction::SwitchTabPrev => ScreenContext::SwitchTabPrev, ScreenInstruction::CloseTab => ScreenContext::CloseTab, ScreenInstruction::GoToTab(_) => ScreenContext::GoToTab, + ScreenInstruction::UpdateTabName(_) => ScreenContext::UpdateTabName, } } } |
