aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r--helix-term/src/commands/lsp.rs4
-rw-r--r--helix-term/src/commands/typed.rs13
2 files changed, 7 insertions, 10 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index 90b6d76c..578eb608 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -13,7 +13,7 @@ use tui::{
use super::{align_view, push_jump, Align, Context, Editor, Open};
use helix_core::{path, Selection};
-use helix_view::{apply_transaction, document::Mode, editor::Action, theme::Style};
+use helix_view::{document::Mode, editor::Action, theme::Style};
use crate::{
compositor::{self, Compositor},
@@ -800,7 +800,7 @@ pub fn apply_workspace_edit(
offset_encoding,
);
let view = view_mut!(editor, view_id);
- apply_transaction(&transaction, doc, view);
+ doc.apply(&transaction, view.id);
doc.append_changes_to_history(view);
};
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index de24c4fb..bd91df5a 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -4,10 +4,7 @@ use crate::job::Job;
use super::*;
-use helix_view::{
- apply_transaction,
- editor::{Action, CloseError, ConfigEvent},
-};
+use helix_view::editor::{Action, CloseError, ConfigEvent};
use ui::completers::{self, Completer};
#[derive(Clone)]
@@ -480,7 +477,7 @@ fn set_line_ending(
}
}),
);
- apply_transaction(&transaction, doc, view);
+ doc.apply(&transaction, view.id);
doc.append_changes_to_history(view);
Ok(())
@@ -925,7 +922,7 @@ fn replace_selections_with_clipboard_impl(
(range.from(), range.to(), Some(contents.as_str().into()))
});
- apply_transaction(&transaction, doc, view);
+ doc.apply(&transaction, view.id);
doc.append_changes_to_history(view);
Ok(())
}
@@ -1596,7 +1593,7 @@ fn sort_impl(
.map(|(s, fragment)| (s.from(), s.to(), Some(fragment))),
);
- apply_transaction(&transaction, doc, view);
+ doc.apply(&transaction, view.id);
doc.append_changes_to_history(view);
Ok(())
@@ -1640,7 +1637,7 @@ fn reflow(
(range.from(), range.to(), Some(reflowed_text))
});
- apply_transaction(&transaction, doc, view);
+ doc.apply(&transaction, view.id);
doc.append_changes_to_history(view);
view.ensure_cursor_in_view(doc, scrolloff);