on master help sign in
Improve Readability (#2639)
commitae12c58f0ff924e9cc512f0368e5fca858566cdd authorRyan Russell <ryanrussell@users.noreply.github.com> dateWed 1 Jun 2022, 12:01 (4 years ago) parentfc666db
11 files changed+15−15
book/src/from-vim.md+1−1 helix-core/src/graphemes.rs+1−1 helix-core/src/history.rs+3−3 helix-core/src/increment/number.rs+1−1 helix-core/src/lib.rs+1−1 helix-core/src/selection.rs+1−1 helix-core/src/surround.rs+1−1 helix-term/src/commands.rs+2−2 helix-term/src/commands/lsp.rs+2−2 helix-term/src/keymap.rs+1−1 helix-view/src/handlers/dap.rs+1−1
book/src/from-vim.md+1−1
@@ -9,4 +9,4 @@ single width selection.
99
1010See also Kakoune's [Migrating from Vim](https://github.com/mawww/kakoune/wiki/Migrating-from-Vim).
1111
12−> TODO: Mention texobjects, surround, registers
12+> TODO: Mention textobjects, surround, registers
helix-core/src/graphemes.rs+1−1
@@ -14,7 +14,7 @@ pub fn grapheme_width(g: &str) -> usize {
1414 // Point 1: theoretically, ascii control characters should have zero
1515 // width, but in our case we actually want them to have width: if they
1616 // show up in text, we want to treat them as textual elements that can
17− // be editied. So we can get away with making all ascii single width
17+ // be edited. So we can get away with making all ascii single width
1818 // here.
1919 // Point 2: we're only examining the first codepoint here, which means
2020 // we're ignoring graphemes formed with combining characters. However,
helix-core/src/history.rs+3−3
@@ -177,7 +177,7 @@ impl History {
177177 }
178178 }
179179
180− /// List of nodes on the way from `n` to 'a`. Doesn`t include `a`.
180+ /// List of nodes on the way from `n` to 'a`. Doesn't include `a`.
181181 /// Includes `n` unless `a == n`. `a` must be an ancestor of `n`.
182182 fn path_up(&self, mut n: usize, a: usize) -> Vec<usize> {
183183 let mut path = Vec::new();
@@ -546,8 +546,8 @@ mod test {
546546
547547 // Units are validated.
548548 assert_eq!(
549− "1 millenium".parse::<UndoKind>(),
550− Err("incorrect time unit: millenium".to_string())
549+ "1 millennium".parse::<UndoKind>(),
550+ Err("incorrect time unit: millennium".to_string())
551551 );
552552
553553 // Units can't be specified twice.
helix-core/src/increment/number.rs+1−1
@@ -377,7 +377,7 @@ mod test {
377377 }
378378
379379 #[test]
380− fn test_increment_basic_hexadedimal_numbers() {
380+ fn test_increment_basic_hexadecimal_numbers() {
381381 let tests = [
382382 ("0x0100", 1, "0x0101"),
383383 ("0x0100", -1, "0x00ff"),
helix-core/src/lib.rs+1−1
@@ -43,7 +43,7 @@ pub fn find_first_non_whitespace_char(line: RopeSlice) -> Option<usize> {
4343///
4444/// Order of detection:
4545/// * Top-most folder containing a root marker in current git repository
46−/// * Git repostory root if no marker detected
46+/// * Git repository root if no marker detected
4747/// * Top-most folder containing a root marker if not git repository detected
4848/// * Current working directory as fallback
4949pub fn find_root(root: Option<&str>, root_markers: &[String]) -> Option<std::path::PathBuf> {
helix-core/src/selection.rs+1−1
@@ -830,7 +830,7 @@ mod test {
830830 }
831831
832832 #[test]
833− fn test_graphem_aligned() {
833+ fn test_grapheme_aligned() {
834834 let r = Rope::from_str("\r\nHi\r\n");
835835 let s = r.slice(..);
836836
helix-core/src/surround.rs+1−1
@@ -66,7 +66,7 @@ pub fn find_nth_closest_pairs_pos(
6666 for ch in text.chars_at(pos) {
6767 if is_open_pair(ch) {
6868 // Track open pairs encountered so that we can step over
69− // the correspoding close pairs that will come up further
69+ // the corresponding close pairs that will come up further
7070 // down the loop. We want to find a lone close pair whose
7171 // open pair is before the cursor position.
7272 stack.push(ch);
helix-term/src/commands.rs+2−2
@@ -1964,7 +1964,7 @@ fn shrink_to_line_bounds(cx: &mut Context) {
19641964 // line_to_char gives us the start position of the line, so
19651965 // we need to get the start position of the next line. In
19661966 // the editor, this will correspond to the cursor being on
1967− // the EOL whitespace charactor, which is what we want.
1967+ // the EOL whitespace character, which is what we want.
19681968 let mut end = text.line_to_char((end_line + 1).min(text.len_lines()));
19691969
19701970 if start != range.from() {
@@ -2929,7 +2929,7 @@ pub mod insert {
29292929 Transaction::change_by_selection(doc.text(), doc.selection(view.id), |range| {
29302930 let pos = range.cursor(text);
29312931 let line_start_pos = text.line_to_char(range.cursor_line(text));
2932− // considier to delete by indent level if all characters before `pos` are indent units.
2932+ // consider to delete by indent level if all characters before `pos` are indent units.
29332933 let fragment = Cow::from(text.slice(line_start_pos..pos));
29342934 if !fragment.is_empty() && fragment.chars().all(|ch| ch.is_whitespace()) {
29352935 if text.get_char(pos.saturating_sub(1)) == Some('\t') {
helix-term/src/commands/lsp.rs+2−2
@@ -416,8 +416,8 @@ pub fn apply_workspace_edit(
416416 }
417417 lsp::DocumentChanges::Operations(operations) => {
418418 log::debug!("document changes - operations: {:?}", operations);
419− for operateion in operations {
420− match operateion {
419+ for operation in operations {
420+ match operation {
421421 lsp::DocumentChangeOperation::Op(op) => {
422422 apply_document_resource_op(op).unwrap();
423423 }
helix-term/src/keymap.rs+1−1
@@ -542,7 +542,7 @@ mod tests {
542542 vec![vec![key!('j')], vec![key!('k')]]
543543 ),
544544 ]),
545− "Mistmatch"
545+ "Mismatch"
546546 )
547547 }
548548}
helix-view/src/handlers/dap.rs+1−1
@@ -86,7 +86,7 @@ pub fn breakpoints_changed(
8686 path: PathBuf,
8787 breakpoints: &mut [Breakpoint],
8888) -> Result<(), anyhow::Error> {
89− // TODO: handle capabilities correctly again, by filterin breakpoints when emitting
89+ // TODO: handle capabilities correctly again, by filtering breakpoints when emitting
9090 // if breakpoint.condition.is_some()
9191 // && !debugger
9292 // .caps