aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorDaniel Sedlak2023-04-07 15:10:38 +0000
committerGitHub2023-04-07 15:10:38 +0000
commite856906f766aa6d58aba6f6bca9e2e1879b1629d (patch)
tree59befeebf031ab8de57df97f836bf08ccb7085f2 /helix-core
parent1148ce1fd9941e00bd416bce1f06a987d0e7b5f2 (diff)
Fix typos (#6643)
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/position.rs4
-rw-r--r--helix-core/src/selection.rs2
-rw-r--r--helix-core/src/shellwords.rs4
-rw-r--r--helix-core/src/text_annotations.rs4
4 files changed, 7 insertions, 7 deletions
diff --git a/helix-core/src/position.rs b/helix-core/src/position.rs
index 04bf8c31..ee764bc6 100644
--- a/helix-core/src/position.rs
+++ b/helix-core/src/position.rs
@@ -109,7 +109,7 @@ pub fn visual_coords_at_pos(text: RopeSlice, pos: usize, tab_width: usize) -> Po
/// softwrapping positions are estimated with an O(1) algorithm
/// to ensure consistent performance for large lines (currently unimplemented)
///
-/// Usualy you want to use `visual_offset_from_anchor` instead but this function
+/// Usually you want to use `visual_offset_from_anchor` instead but this function
/// can be useful (and faster) if
/// * You already know the visual position of the block
/// * You only care about the horizontal offset (column) and not the vertical offset (row)
@@ -291,7 +291,7 @@ pub fn pos_at_visual_coords(text: RopeSlice, coords: Position, tab_width: usize)
///
/// If no (text) grapheme starts at exactly at the specified column the
/// start of the grapheme to the left is returned. If there is no grapheme
-/// to the left (for example if the line starts with virtual text) then the positiong
+/// to the left (for example if the line starts with virtual text) then the positioning
/// of the next grapheme to the right is returned.
///
/// If the `line` coordinate is beyond the end of the file, the EOF
diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs
index 8e93c633..259b131a 100644
--- a/helix-core/src/selection.rs
+++ b/helix-core/src/selection.rs
@@ -38,7 +38,7 @@ use std::borrow::Cow;
/// Ranges are considered to be inclusive on the left and
/// exclusive on the right, regardless of anchor-head ordering.
/// This means, for example, that non-zero-width ranges that
-/// are directly adjecent, sharing an edge, do not overlap.
+/// are directly adjacent, sharing an edge, do not overlap.
/// However, a zero-width range will overlap with the shared
/// left-edge of another range.
///
diff --git a/helix-core/src/shellwords.rs b/helix-core/src/shellwords.rs
index 0883eb91..9d873c36 100644
--- a/helix-core/src/shellwords.rs
+++ b/helix-core/src/shellwords.rs
@@ -294,14 +294,14 @@ mod test {
#[test]
fn test_lists() {
let input =
- r#":set statusline.center ["file-type","file-encoding"] '["list", "in", "qoutes"]'"#;
+ r#":set statusline.center ["file-type","file-encoding"] '["list", "in", "quotes"]'"#;
let shellwords = Shellwords::from(input);
let result = shellwords.words().to_vec();
let expected = vec![
Cow::from(":set"),
Cow::from("statusline.center"),
Cow::from(r#"["file-type","file-encoding"]"#),
- Cow::from(r#"["list", "in", "qoutes"]"#),
+ Cow::from(r#"["list", "in", "quotes"]"#),
];
assert_eq!(expected, result);
}
diff --git a/helix-core/src/text_annotations.rs b/helix-core/src/text_annotations.rs
index e6093184..11d19d48 100644
--- a/helix-core/src/text_annotations.rs
+++ b/helix-core/src/text_annotations.rs
@@ -172,7 +172,7 @@ impl TextAnnotations {
for char_idx in char_range {
if let Some((_, Some(highlight))) = self.overlay_at(char_idx) {
// we don't know the number of chars the original grapheme takes
- // however it doesn't matter as highlight bounderies are automatically
+ // however it doesn't matter as highlight boundaries are automatically
// aligned to grapheme boundaries in the rendering code
highlights.push((highlight.0, char_idx..char_idx + 1))
}
@@ -203,7 +203,7 @@ impl TextAnnotations {
/// Add new grapheme overlays.
///
- /// The overlayed grapheme will be rendered with `highlight`
+ /// The overlaid grapheme will be rendered with `highlight`
/// patched on top of `ui.text`.
///
/// The overlays **must be sorted** by their `char_idx`.