mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
fmt
This commit is contained in:
@@ -206,8 +206,7 @@ impl Component for Input {
|
||||
render.render_widget(p, area);
|
||||
// Set cursor, if focus
|
||||
if self.states.focus {
|
||||
let x: u16 =
|
||||
area.x + (self.states.cursor as u16) + 1;
|
||||
let x: u16 = area.x + (self.states.cursor as u16) + 1;
|
||||
render.set_cursor(x, area.y + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,11 +26,7 @@
|
||||
// locals
|
||||
use super::{Canvas, Component, InputEvent, Msg, Payload, Props, PropsBuilder};
|
||||
// ext
|
||||
use tui::{
|
||||
layout::Rect,
|
||||
style::Style,
|
||||
widgets::Paragraph,
|
||||
};
|
||||
use tui::{layout::Rect, style::Style, widgets::Paragraph};
|
||||
|
||||
// -- state
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
// Modules
|
||||
pub mod components;
|
||||
pub mod props;
|
||||
pub mod view;
|
||||
pub mod utils;
|
||||
pub mod view;
|
||||
|
||||
// locals
|
||||
use props::{PropValue, Props, PropsBuilder};
|
||||
|
||||
@@ -185,7 +185,9 @@ impl View {
|
||||
if let Some(active_component) = self.focus.take() {
|
||||
if active_component != component {
|
||||
// Blur active component if are different
|
||||
if let Some(active_component) = self.components.get_mut(active_component.as_str()) {
|
||||
if let Some(active_component) =
|
||||
self.components.get_mut(active_component.as_str())
|
||||
{
|
||||
active_component.blur();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user