Răsfoiți Sursa

app/ui/edit: call `finish_select()` after paste action

This fixes a panic from assert at line 745 (inside `get_select_handles()`) on android when pasting with selected text.
epiphany 2 luni în urmă
părinte
comite
a618427359
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      bin/app/src/ui/edit/mod.rs

+ 2 - 0
bin/app/src/ui/edit/mod.rs

@@ -704,6 +704,7 @@ impl BaseEdit {
                     if let Some(txt) = miniquad::window::clipboard_get() {
                         self.editor.lock().insert(&txt, atom);
                         self.behave.apply_cursor_scroll();
+                        self.finish_select(atom);
                     }
                 }
                 ACTION_SELALL => {
@@ -1818,6 +1819,7 @@ impl UIObject for BaseEdit {
                     if let Some(txt) = miniquad::window::clipboard_get() {
                         self.editor.lock().insert(&txt, atom);
                         self.behave.apply_cursor_scroll();
+                        self.finish_select(atom);
                     }
                 }
                 ACTION_SELALL => {