aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
authorNathan Vegdahl2021-06-30 14:45:15 +0000
committerNathan Vegdahl2021-07-01 21:22:28 +0000
commit7c7be6d58326725954be7bd16fa3ff5e84610c17 (patch)
tree9bff2a3e27a732f5e2fc53e0f951e0dc08712c3c /helix-view/src
parent0ae522f3df433bb778fa2ff98fd3d7047021c6ef (diff)
Make `Selection`'s normalize and transform methods self-consuming only.
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/document.rs20
1 files changed, 2 insertions, 18 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index 59a1c42c..0f1f3a8f 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -13,8 +13,8 @@ use helix_core::{
history::History,
line_ending::auto_detect_line_ending,
syntax::{self, LanguageConfiguration},
- ChangeSet, Diagnostic, LineEnding, Rope, RopeBuilder, RopeSlice, Selection, State, Syntax,
- Transaction, DEFAULT_LINE_ENDING,
+ ChangeSet, Diagnostic, LineEnding, Rope, RopeBuilder, Selection, State, Syntax, Transaction,
+ DEFAULT_LINE_ENDING,
};
use helix_lsp::util::LspFormatting;
@@ -1000,22 +1000,6 @@ impl Document {
&self.selections[&view_id]
}
- #[inline]
- pub fn selection_mut(&mut self, view_id: ViewId) -> &mut Selection {
- self.selections
- .get_mut(&view_id)
- .expect("No selection set with the given ViewId")
- }
-
- pub fn text_and_mut_selection(&mut self, view_id: ViewId) -> (RopeSlice, &mut Selection) {
- (
- self.text.slice(..),
- self.selections
- .get_mut(&view_id)
- .expect("No selection set with the given ViewId"),
- )
- }
-
pub fn relative_path(&self) -> Option<PathBuf> {
let cwdir = std::env::current_dir().expect("couldn't determine current directory");