mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-03 06:51:50 -06:00
fix(ui): preserve test-verified selection and paste recency semantics
This commit is contained in:
@@ -1048,7 +1048,7 @@ impl crate::PdfCraftApp {
|
||||
}
|
||||
let command_recent = self
|
||||
.last_command_frame
|
||||
.is_some_and(|(f, t)| if inp.time > 0.0 { (inp.time - t).abs() < 0.35 } else { self.frame_count.saturating_sub(f) <= 10 });
|
||||
.is_some_and(|(f, t)| self.frame_count.saturating_sub(f) <= 10 || (inp.time > 0.0 && (inp.time - t).abs() < 0.35));
|
||||
let command_active = modifiers.command || command_recent;
|
||||
if !*pressed && !self.v_pressed && command_active {
|
||||
released = true;
|
||||
|
||||
@@ -703,6 +703,7 @@ impl LineEditor {
|
||||
self.look0 = self.look.clone();
|
||||
self.extras0 = self.extras;
|
||||
self.original = self.text.clone();
|
||||
self.selection = None;
|
||||
// The page now has this text: the box's history restarts, even when the format left the
|
||||
// text as it was, so a Redo from before can't put undone typing back on top of it.
|
||||
self.typing_from = None;
|
||||
|
||||
Reference in New Issue
Block a user