on master help sign in
minor, fix clippy lint
commit8289bd1cb0cf34d26a9f452850081799311e3f45 authorBlaž Hrastnik <blaz@mxxn.io> dateThu 25 Feb 2021, 16:52 (6 years ago) parent01907b3
3 files changed+4−5
helix-syntax/build.rs+1−1 helix-term/src/commands.rs+1−4 helix-view/src/editor.rs+2
helix-syntax/build.rs+1−1
@@ -133,7 +133,7 @@ fn main() {
133133 tx.send(1).unwrap();
134134 });
135135 }
136− assert_eq!(rx.iter().take(n_jobs).fold(0, |a, b| a + b), n_jobs);
136+ assert_eq!(rx.iter().take(n_jobs).sum::<usize>(), n_jobs);
137137
138138 build_dir("tree-sitter-typescript/tsx", "tsx");
139139 build_dir("tree-sitter-typescript/typescript", "typescript");
helix-term/src/commands.rs+1−4
@@ -470,8 +470,6 @@ pub fn flip_selections(cx: &mut Context) {
470470
471471fn enter_insert_mode(doc: &mut Document) {
472472 doc.mode = Mode::Insert;
473−
474− // TODO: store selection for undo
475473}
476474
477475// inserts at the start of each selection
@@ -493,10 +491,9 @@ pub fn append_mode(cx: &mut Context) {
493491
494492 let text = doc.text().slice(..);
495493 let selection = doc.selection().transform(|range| {
496− // TODO: to() + next char
497494 Range::new(
498495 range.from(),
499− graphemes::next_grapheme_boundary(text, range.to()),
496+ graphemes::next_grapheme_boundary(text, range.to()), // to() + next char
500497 )
501498 });
502499 doc.set_selection(selection);
helix-view/src/editor.rs+2
@@ -33,6 +33,8 @@ impl Editor {
3333 }
3434
3535 pub fn open(&mut self, path: PathBuf, executor: &smol::Executor) -> Result<(), Error> {
36+ // TODO: try to find an open view/buffer first
37+
3638 let mut doc = Document::load(path, self.theme.scopes())?;
3739
3840 // try to find a language server based on the language name