summaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/sheetview/mod.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/widgets/sheetview/mod.rs b/src/widgets/sheetview/mod.rs
index aac2080..2239a0b 100644
--- a/src/widgets/sheetview/mod.rs
+++ b/src/widgets/sheetview/mod.rs
@@ -3,7 +3,7 @@ use ratatui::{
prelude::*,
style::Stylize,
text::ToLine,
- widgets::Widget,
+ widgets::{Paragraph, Widget},
};
use crate::{
@@ -62,10 +62,10 @@ impl SheetView {
fn open_editor(&self) {
let mut state = GlobalState::instance_mut();
state.editor.buffer.set_lines_from_string(
-r#"require('neosheet')
+ r#"require('neosheet')
.state
.view
- .active:foreach(function(cell)
+ .active:map(function(cell)
return ""
end)"#,
);
@@ -188,6 +188,13 @@ impl Widget for &mut SheetView {
self.scroll.1 = cursor.x();
}
+ theme
+ .background
+ .get((), &lua::get())
+ .unwrap_or_default()
+ .apply(Paragraph::default())
+ .render(area, buf);
+
for row in 0..viewport_rows {
for column in 0..(viewport_columns + 1) {
let (cell_pos_y, cell_pos_x) = (row + self.scroll.0, column + self.scroll.1);