sabiql 1.9.0

A fast, driver-less TUI for browsing and editing PostgreSQL databases
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use ratatui::style::Style;
use ratatui::text::Line;

use crate::ui::theme::Theme;

pub fn apply_yank_flash(lines: &mut [Line], active: bool) {
    if !active {
        return;
    }
    let flash_style = Style::default()
        .fg(Theme::YANK_FLASH_FG)
        .bg(Theme::YANK_FLASH_BG);
    for line in lines {
        *line = std::mem::take(line).style(flash_style);
    }
}