|
|
@ -10,10 +10,7 @@ use cassowary::{
|
|
|
|
{Expression, Solver},
|
|
|
|
{Expression, Solver},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
use helix_view::graphics::{Rect, Style};
|
|
|
|
use helix_view::graphics::{Rect, Style};
|
|
|
|
use std::{
|
|
|
|
use std::collections::HashMap;
|
|
|
|
collections::HashMap,
|
|
|
|
|
|
|
|
iter::{self, Iterator},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
use unicode_width::UnicodeWidthStr;
|
|
|
|
use unicode_width::UnicodeWidthStr;
|
|
|
|
|
|
|
|
|
|
|
|
/// A [`Cell`] contains the [`Text`] to be displayed in a [`Row`] of a [`Table`].
|
|
|
|
/// A [`Cell`] contains the [`Text`] to be displayed in a [`Row`] of a [`Table`].
|
|
|
@ -415,9 +412,7 @@ impl<'a> Table<'a> {
|
|
|
|
let has_selection = state.selected.is_some();
|
|
|
|
let has_selection = state.selected.is_some();
|
|
|
|
let columns_widths = self.get_columns_widths(table_area.width, has_selection);
|
|
|
|
let columns_widths = self.get_columns_widths(table_area.width, has_selection);
|
|
|
|
let highlight_symbol = self.highlight_symbol.unwrap_or("");
|
|
|
|
let highlight_symbol = self.highlight_symbol.unwrap_or("");
|
|
|
|
let blank_symbol = iter::repeat(" ")
|
|
|
|
let blank_symbol = " ".repeat(highlight_symbol.width());
|
|
|
|
.take(highlight_symbol.width())
|
|
|
|
|
|
|
|
.collect::<String>();
|
|
|
|
|
|
|
|
let mut current_height = 0;
|
|
|
|
let mut current_height = 0;
|
|
|
|
let mut rows_height = table_area.height;
|
|
|
|
let mut rows_height = table_area.height;
|
|
|
|
|
|
|
|
|
|
|
|