Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge some fixes into solus (#2)
Browse files Browse the repository at this point in the history
* chore: update copyright year (ChrisTitusTech#988)

* refact: minor fixes (ChrisTitusTech#971)

* Fix unused float handle mouse function, pub mod appstate

Fix unnecessary usage of pub mod for appstate and resolve unused float handle mouse function

* Resolve clippy warnings

Remove explicit lifetime for floatcontent impl. Use div_ceil instead of manually calculating the rows for hints

---------

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
Co-authored-by: Jeevitha Kannan K S <ksjeevithakannan123@gmail.com>
3 people authored Jan 10, 2025
1 parent c9c4803 commit fcf7886
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Chris Titus
Copyright (c) 2025 Chris Titus

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
2 changes: 1 addition & 1 deletion man/linutil.1
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@ Please consider submitting feedback if you do.
https://github.com/ChrisTitusTech/linutil/issues

.SH COPYRIGHT
Copyright (c) 2024 Chris Titus.
Copyright (c) 2025 Chris Titus.
.br
MIT License.
https://opensource.org/license/MIT
2 changes: 1 addition & 1 deletion tui/src/floating_text.rs
Original file line number Diff line number Diff line change
@@ -171,7 +171,7 @@ impl<'a> FloatingText<'a> {
}
}

impl<'a> FloatContent for FloatingText<'a> {
impl FloatContent for FloatingText<'_> {
fn draw(&mut self, frame: &mut Frame, area: Rect, _theme: &Theme) {
let block = Block::default()
.borders(Borders::ALL)
2 changes: 1 addition & 1 deletion tui/src/hint.rs
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ pub fn create_shortcut_list(
.unwrap_or(0);

let columns = (render_width as usize / (max_shortcut_width + 4)).max(1);
let rows = (shortcut_spans.len() + columns - 1) / columns;
let rows = shortcut_spans.len().div_ceil(columns);

let mut lines: Vec<Line<'static>> = Vec::with_capacity(rows);

2 changes: 1 addition & 1 deletion tui/src/main.rs
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ mod floating_text;
mod hint;
mod root;
mod running_command;
pub mod state;
mod state;
mod theme;

#[cfg(feature = "tips")]
2 changes: 1 addition & 1 deletion tui/src/state.rs
Original file line number Diff line number Diff line change
@@ -480,7 +480,7 @@ impl AppState {
}
match &mut self.focus {
Focus::FloatingWindow(float) => {
float.content.handle_mouse_event(event);
float.handle_mouse_event(event);
}
Focus::ConfirmationPrompt(confirm) => {
confirm.content.handle_mouse_event(event);

0 comments on commit fcf7886

Please sign in to comment.