aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorRyan Russell2022-06-01 17:01:37 +0000
committerGitHub2022-06-01 17:01:37 +0000
commitae12c58f0ff924e9cc512f0368e5fca858566cdd (patch)
tree62bde8852872881444465558b3fc576335c8e420 /helix-core
parentfc666db6b99a8baab0acf3791f9965e7cb2be9e1 (diff)
Improve Readability (#2639)
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/graphemes.rs2
-rw-r--r--helix-core/src/history.rs6
-rw-r--r--helix-core/src/increment/number.rs2
-rw-r--r--helix-core/src/lib.rs2
-rw-r--r--helix-core/src/selection.rs2
-rw-r--r--helix-core/src/surround.rs2
6 files changed, 8 insertions, 8 deletions
diff --git a/helix-core/src/graphemes.rs b/helix-core/src/graphemes.rs
index c0c61775..675f5750 100644
--- a/helix-core/src/graphemes.rs
+++ b/helix-core/src/graphemes.rs
@@ -14,7 +14,7 @@ pub fn grapheme_width(g: &str) -> usize {
// Point 1: theoretically, ascii control characters should have zero
// width, but in our case we actually want them to have width: if they
// show up in text, we want to treat them as textual elements that can
- // be editied. So we can get away with making all ascii single width
+ // be edited. So we can get away with making all ascii single width
// here.
// Point 2: we're only examining the first codepoint here, which means
// we're ignoring graphemes formed with combining characters. However,
diff --git a/helix-core/src/history.rs b/helix-core/src/history.rs
index 3f324e34..b608097c 100644
--- a/helix-core/src/history.rs
+++ b/helix-core/src/history.rs
@@ -177,7 +177,7 @@ impl History {
}
}
- /// List of nodes on the way from `n` to 'a`. Doesn`t include `a`.
+ /// List of nodes on the way from `n` to 'a`. Doesn't include `a`.
/// Includes `n` unless `a == n`. `a` must be an ancestor of `n`.
fn path_up(&self, mut n: usize, a: usize) -> Vec<usize> {
let mut path = Vec::new();
@@ -546,8 +546,8 @@ mod test {
// Units are validated.
assert_eq!(
- "1 millenium".parse::<UndoKind>(),
- Err("incorrect time unit: millenium".to_string())
+ "1 millennium".parse::<UndoKind>(),
+ Err("incorrect time unit: millennium".to_string())
);
// Units can't be specified twice.
diff --git a/helix-core/src/increment/number.rs b/helix-core/src/increment/number.rs
index 57171f67..62b4a19d 100644
--- a/helix-core/src/increment/number.rs
+++ b/helix-core/src/increment/number.rs
@@ -377,7 +377,7 @@ mod test {
}
#[test]
- fn test_increment_basic_hexadedimal_numbers() {
+ fn test_increment_basic_hexadecimal_numbers() {
let tests = [
("0x0100", 1, "0x0101"),
("0x0100", -1, "0x00ff"),
diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs
index 7d857b0f..627b73bb 100644
--- a/helix-core/src/lib.rs
+++ b/helix-core/src/lib.rs
@@ -43,7 +43,7 @@ pub fn find_first_non_whitespace_char(line: RopeSlice) -> Option<usize> {
///
/// Order of detection:
/// * Top-most folder containing a root marker in current git repository
-/// * Git repostory root if no marker detected
+/// * Git repository root if no marker detected
/// * Top-most folder containing a root marker if not git repository detected
/// * Current working directory as fallback
pub fn find_root(root: Option<&str>, root_markers: &[String]) -> Option<std::path::PathBuf> {
diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs
index c6eceb4b..1b2416f5 100644
--- a/helix-core/src/selection.rs
+++ b/helix-core/src/selection.rs
@@ -830,7 +830,7 @@ mod test {
}
#[test]
- fn test_graphem_aligned() {
+ fn test_grapheme_aligned() {
let r = Rope::from_str("\r\nHi\r\n");
let s = r.slice(..);
diff --git a/helix-core/src/surround.rs b/helix-core/src/surround.rs
index db51b8f1..6244b380 100644
--- a/helix-core/src/surround.rs
+++ b/helix-core/src/surround.rs
@@ -66,7 +66,7 @@ pub fn find_nth_closest_pairs_pos(
for ch in text.chars_at(pos) {
if is_open_pair(ch) {
// Track open pairs encountered so that we can step over
- // the correspoding close pairs that will come up further
+ // the corresponding close pairs that will come up further
// down the loop. We want to find a lone close pair whose
// open pair is before the cursor position.
stack.push(ch);