aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
authorPascal Kuthe2023-04-04 21:34:47 +0000
committerBlaž Hrastnik2023-05-18 06:16:50 +0000
commit5406e9f629313221c8ae97583393dfd6221d3dfc (patch)
tree9aea16dd0b4ac73f9ab989e4b433b594d0b34ab6 /helix-view/src/editor.rs
parent91da0dc172dde1a972be7708188a134db70562c3 (diff)
correctly handle completion rerequest
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 8e4dab41..43227c5f 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -1,7 +1,7 @@
use crate::{
align_view,
clipboard::{get_clipboard_provider, ClipboardProvider},
- document::{DocumentSavedEventFuture, DocumentSavedEventResult, Mode},
+ document::{DocumentSavedEventFuture, DocumentSavedEventResult, Mode, SavePoint},
graphics::{CursorKind, Rect},
info::Info,
input::KeyEvent,
@@ -906,9 +906,14 @@ enum ThemeAction {
}
#[derive(Debug, Clone)]
-pub struct CompleteAction {
- pub trigger_offset: usize,
- pub changes: Vec<Change>,
+pub enum CompleteAction {
+ Applied {
+ trigger_offset: usize,
+ changes: Vec<Change>,
+ },
+ /// A savepoint of the currently active completion. The completion
+ /// MUST be restored before sending any event to the LSP
+ Selected { savepoint: Arc<SavePoint> },
}
#[derive(Debug, Copy, Clone)]