You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let cell_height_px = window_size.height / window_size.rows;
197
+
let cell_width_px = window_size.width / window_size.columns;
198
+
199
+
execute!(
200
+
std::io::stdout(),
201
+
EnterAlternateScreen,
202
+
crossterm::cursor::Hide,
203
+
crossterm::event::EnableMouseCapture
204
+
)
205
+
.map_err(|e| {
206
+
WrappedErr(
207
+
format!(
208
+
"Couldn't enter the alternate screen and hide the cursor for proper presentation: {e}"
209
+
)
210
+
.into()
211
+
)
212
+
})?;
213
+
175
214
// We need to create `picker` on this thread because if we create it on the `renderer` thread,
176
215
// it messes up something with user input. Input never makes it to the crossterm thing
177
216
let picker = Picker::from_query_stdio()
178
-
.map_err(|e| WrappedErr(match e {
179
-
ratatui_image::errors::Errors::NoFontSize =>
180
-
"Unable to detect your terminal's font size; this is an issue with your terminal emulator.\nPlease use a different terminal emulator or report this bug to tdf.".into(),
181
-
e => format!("Couldn't get the necessary information to set up images: {e}").into()
"Unable to detect your terminal's font size; this is an issue with your terminal emulator.\nPlease use a different terminal emulator or report this bug to tdf.".into()
226
+
)),
227
+
e => Err(WrappedErr(format!("Couldn't get the necessary information to set up images: {e}").into()))
228
+
})?;
183
229
184
230
// then we want to spawn off the rendering task
185
231
// We need to use the thread::spawn API so that this exists in a thread not owned by tokio,
0 commit comments