Rename Internal::idle_pane
to active_pane
This commit is contained in:
parent
33f33ed4e3
commit
cfc2b55e05
@ -533,7 +533,7 @@ where
|
|||||||
if let Some(on_key_press) = &self.on_key_press {
|
if let Some(on_key_press) = &self.on_key_press {
|
||||||
// TODO: Discard when event is captured
|
// TODO: Discard when event is captured
|
||||||
if state == ButtonState::Pressed {
|
if state == ButtonState::Pressed {
|
||||||
if let Some(_) = self.state.idle_pane() {
|
if let Some(_) = self.state.active_pane() {
|
||||||
if modifiers.matches(self.modifier_keys) {
|
if modifiers.matches(self.modifier_keys) {
|
||||||
if let Some(message) =
|
if let Some(message) =
|
||||||
on_key_press(KeyPressEvent {
|
on_key_press(KeyPressEvent {
|
||||||
|
@ -109,10 +109,7 @@ impl<T> State<T> {
|
|||||||
/// [`Pane`]: struct.Pane.html
|
/// [`Pane`]: struct.Pane.html
|
||||||
/// [`State`]: struct.State.html
|
/// [`State`]: struct.State.html
|
||||||
pub fn active(&self) -> Option<Pane> {
|
pub fn active(&self) -> Option<Pane> {
|
||||||
match self.internal.action {
|
self.internal.active_pane()
|
||||||
Action::Idle { focus } => focus,
|
|
||||||
_ => None,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the adjacent [`Pane`] of another [`Pane`] in the given
|
/// Returns the adjacent [`Pane`] of another [`Pane`] in the given
|
||||||
@ -289,7 +286,7 @@ impl Internal {
|
|||||||
self.action
|
self.action
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn idle_pane(&self) -> Option<Pane> {
|
pub fn active_pane(&self) -> Option<Pane> {
|
||||||
match self.action {
|
match self.action {
|
||||||
Action::Idle { focus } => focus,
|
Action::Idle { focus } => focus,
|
||||||
_ => None,
|
_ => None,
|
||||||
|
Loading…
Reference in New Issue
Block a user