mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 10:08:00 -06:00
* view: check Shift-Command-G before Command-G for find navigation (#810) * fix: recognize paragraph drafts as unsaved work (Issue #811) --------- Co-authored-by: Brandon Thomas <echelon@gmail.com>
This commit is contained in:
co-authored by
Brandon Thomas
parent
724f13cced
commit
f54aa1db1e
@@ -87,6 +87,11 @@ impl LineEditor {
|
||||
(self.max_width > self.rect.width()).then_some(self.max_width)
|
||||
}
|
||||
|
||||
/// Whether the edited text differs from the original (unsaved changes).
|
||||
pub fn has_unsaved_text(&self) -> bool {
|
||||
self.text != self.original
|
||||
}
|
||||
|
||||
/// The formatting the panel changed.
|
||||
pub fn style(&self) -> pdfcraft_engine::BlockStyle {
|
||||
let (l, o) = (&self.look, &self.look0);
|
||||
|
||||
@@ -349,6 +349,7 @@ impl PdfCraftApp {
|
||||
|| v.content.blocked().is_some()
|
||||
|| v.forms.focus.as_ref().is_some_and(|f| crate::forms_ui::draft_edit(f, &doc.form).is_some())
|
||||
|| v.fill_text.as_ref().is_some_and(|t| !t.text.trim().is_empty())
|
||||
|| v.line_editor.as_ref().map_or_else(|| false, |ed| ed.has_unsaved_text())
|
||||
}
|
||||
|
||||
/// Save the active document. Returns `true` if it was written.
|
||||
|
||||
Reference in New Issue
Block a user