mirror of
https://github.com/itsjunetime/tdf.git
synced 2026-06-01 23:51:46 -04:00
Update mupdf to use git dependency so it works on windows
This commit is contained in:
@@ -26,6 +26,7 @@ pub enum MaybeTransferred {
|
||||
Transferred(kittage::ImageId)
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum ConvertedImage {
|
||||
Generic(Protocol),
|
||||
Kitty {
|
||||
@@ -168,6 +169,8 @@ pub async fn run_conversion_loop(
|
||||
)
|
||||
};
|
||||
|
||||
log::debug!("got converted page for num {} with results {:?}", page_info.page_num, page_info.result_rects);
|
||||
|
||||
// update the iteration to the iteration that we stole this image from
|
||||
*iteration = new_iter;
|
||||
|
||||
|
||||
+4
-4
@@ -2,7 +2,7 @@ use std::{collections::VecDeque, num::NonZeroUsize, thread::sleep, time::Duratio
|
||||
|
||||
use flume::{Receiver, SendError, Sender, TryRecvError};
|
||||
use mupdf::{
|
||||
Colorspace, Document, Matrix, Page, Pixmap, Quad, TextPageOptions, text_page::SearchHitResponse
|
||||
Colorspace, Document, Matrix, Page, Pixmap, Quad, TextPageFlags, text_page::SearchHitResponse
|
||||
};
|
||||
use ratatui::layout::Rect;
|
||||
|
||||
@@ -520,7 +520,7 @@ fn render_single_page_to_ctx(
|
||||
})
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct HighlightRect {
|
||||
pub ul_x: u32,
|
||||
pub ul_y: u32,
|
||||
@@ -536,7 +536,7 @@ fn search_page(
|
||||
) -> Result<Vec<Quad>, mupdf::error::Error> {
|
||||
search_term
|
||||
.map(|term| {
|
||||
page.to_text_page(TextPageOptions::empty())
|
||||
page.to_text_page(TextPageFlags::empty())
|
||||
.and_then(|page| {
|
||||
let mut v = Vec::with_capacity(trusted_search_results);
|
||||
page.search_cb(term, &mut v, |v, results| {
|
||||
@@ -552,7 +552,7 @@ fn search_page(
|
||||
|
||||
#[inline]
|
||||
fn count_search_results(page: &Page, search_term: &str) -> Result<usize, mupdf::error::Error> {
|
||||
page.to_text_page(TextPageOptions::empty())
|
||||
page.to_text_page(TextPageFlags::empty())
|
||||
.and_then(|page| {
|
||||
let mut count = 0;
|
||||
page.search_cb(search_term, &mut count, |count, results| {
|
||||
|
||||
@@ -427,6 +427,8 @@ impl Tui {
|
||||
}
|
||||
}
|
||||
|
||||
log::debug!("tui got page {page_num} ready with img {img:#?}");
|
||||
|
||||
// We always just set this here because we handle reloading in the `set_n_pages` function.
|
||||
// If the document was reloaded, then It'll have the `set_n_pages` called to set the new
|
||||
// number of pages, so the vec will already be cleared
|
||||
|
||||
Reference in New Issue
Block a user