on master help sign in
minor, fix clippy lint
8289bd1Blaž Hrastnik
helix-syntax/build.rs+1−1
@@ -133,7 +133,7 @@ fn main() {
133 tx.send(1).unwrap();
133 tx.send(1).unwrap();
134 });
134 });
135 }
135 }
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);
137
137
138 build_dir("tree-sitter-typescript/tsx", "tsx");
138 build_dir("tree-sitter-typescript/tsx", "tsx");
139 build_dir("tree-sitter-typescript/typescript", "typescript");
139 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) {
470
470
471fn enter_insert_mode(doc: &mut Document) {
471fn enter_insert_mode(doc: &mut Document) {
472 doc.mode = Mode::Insert;
472 doc.mode = Mode::Insert;
473−
474− // TODO: store selection for undo
475}
473}
476
474
477// inserts at the start of each selection
475// inserts at the start of each selection
@@ -493,10 +491,9 @@ pub fn append_mode(cx: &mut Context) {
493
491
494 let text = doc.text().slice(..);
492 let text = doc.text().slice(..);
495 let selection = doc.selection().transform(|range| {
493 let selection = doc.selection().transform(|range| {
496− // TODO: to() + next char
497 Range::new(
494 Range::new(
498 range.from(),
495 range.from(),
499− graphemes::next_grapheme_boundary(text, range.to()),
496+ graphemes::next_grapheme_boundary(text, range.to()), // to() + next char
500 )
497 )
501 });
498 });
502 doc.set_selection(selection);
499 doc.set_selection(selection);
helix-view/src/editor.rs+2
@@ -33,6 +33,8 @@ impl Editor {
33 }
33 }
34
34
35 pub fn open(&mut self, path: PathBuf, executor: &smol::Executor) -> Result<(), Error> {
35 pub fn open(&mut self, path: PathBuf, executor: &smol::Executor) -> Result<(), Error> {
36+ // TODO: try to find an open view/buffer first
37+
36 let mut doc = Document::load(path, self.theme.scopes())?;
38 let mut doc = Document::load(path, self.theme.scopes())?;
37
39
38 // try to find a language server based on the language name
40 // try to find a language server based on the language name