Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rowdy"
version = "0.17.0"
version = "0.17.1"
edition = "2024"
rust-version = "1.86"
license = "MIT"
Expand Down
18 changes: 17 additions & 1 deletion src/ui/params_prompt_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use ratatui::buffer::Buffer;
use ratatui::layout::{Constraint, Layout, Rect};
use ratatui::style::{Modifier, Style};
use ratatui::text::{Line, Span};
use ratatui::widgets::{Block, Borders, Paragraph, Widget, Wrap};
use ratatui::widgets::{Block, Borders, Clear, Paragraph, Widget, Wrap};
use ratatui_textarea::TextArea;

use crate::state::params_prompt::ParamsPromptState;
Expand All @@ -31,6 +31,22 @@ impl Widget for ParamsPrompt<'_> {
return;
};

// Wipe the cells under the popover first. Block::style only sets
// each cell's style — it doesn't overwrite the glyph — so without
// an explicit Clear the editor's characters show through the
// popover background.
Clear.render(box_area, buf);
// Repaint with the theme bg so the cleared cells aren't terminal
// default (which can be transparent in some emulators).
for y in box_area.y..box_area.y + box_area.height {
for x in box_area.x..box_area.x + box_area.width {
if let Some(cell) = buf.cell_mut((x, y)) {
cell.set_bg(self.theme.bg);
cell.set_fg(self.theme.fg);
}
}
}

let block = Block::default()
.borders(Borders::ALL)
.border_style(
Expand Down
14 changes: 13 additions & 1 deletion src/ui/saved_query_picker_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use ratatui::buffer::Buffer;
use ratatui::layout::{Constraint, Layout, Rect};
use ratatui::style::{Modifier, Style};
use ratatui::text::{Line, Span};
use ratatui::widgets::{Block, Borders, Paragraph, Widget, Wrap};
use ratatui::widgets::{Block, Borders, Clear, Paragraph, Widget, Wrap};

use crate::state::saved_query_picker::SavedQueryPickerState;
use crate::ui::theme::Theme;
Expand All @@ -18,6 +18,18 @@ impl Widget for SavedQueryPicker<'_> {
let Some(box_area) = inner_box(area, self.state.entries.len()) else {
return;
};
// Wipe + repaint the box cells so the editor underneath doesn't
// show through. Block::style only sets style on inner cells, it
// doesn't overwrite the glyphs already there.
Clear.render(box_area, buf);
for y in box_area.y..box_area.y + box_area.height {
for x in box_area.x..box_area.x + box_area.width {
if let Some(cell) = buf.cell_mut((x, y)) {
cell.set_bg(self.theme.bg);
cell.set_fg(self.theme.fg);
}
}
}
let title = match self.connection {
Some(c) => format!(" run saved query — {c} "),
None => " run saved query ".to_string(),
Expand Down
Loading