mirror of
https://github.com/wez/wezterm.git
synced 2024-11-23 15:04:36 +03:00
window:active_key_table now includes per-pane stacks
refs: https://github.com/wez/wezterm/discussions/2986
This commit is contained in:
parent
9a76a54081
commit
59b609f592
@ -77,6 +77,9 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
[#2977](https://github.com/wez/wezterm/pull/2977)
|
||||
* mux: `default_workspace` was not always respected when spawning
|
||||
[#2981](https://github.com/wez/wezterm/issues/2981)
|
||||
* [window:active_key_table()](config/lua/window/active_key_table.md) now
|
||||
factors in pane-specific key table stacks for things like `CopyMode`.
|
||||
[#2986](https://github.com/wez/wezterm/discussions/2986)
|
||||
|
||||
#### Changed
|
||||
* `CTRL-SHIFT-P` now activates the new command palette, instead of `PaneSelect`
|
||||
|
@ -524,7 +524,25 @@ impl super::TermWindow {
|
||||
}
|
||||
|
||||
pub fn current_key_table_name(&mut self) -> Option<String> {
|
||||
let name = self.key_table_state.current_table().map(|s| s.to_string());
|
||||
let mut name = None;
|
||||
|
||||
if let Some(pane) = self.get_active_pane_or_overlay() {
|
||||
if let Some(overlay) = self.pane_state(pane.pane_id()).overlay.as_mut() {
|
||||
name = overlay
|
||||
.key_table_state
|
||||
.current_table()
|
||||
.map(|s| s.to_string());
|
||||
|
||||
if let Some(entry) = overlay.key_table_state.stack.last() {
|
||||
if let Some(expiry) = entry.expiration {
|
||||
self.update_next_frame_time(Some(expiry));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if name.is_none() {
|
||||
name = self.key_table_state.current_table().map(|s| s.to_string());
|
||||
}
|
||||
if let Some(entry) = self.key_table_state.stack.last() {
|
||||
if let Some(expiry) = entry.expiration {
|
||||
self.update_next_frame_time(Some(expiry));
|
||||
|
Loading…
Reference in New Issue
Block a user