diff options
author | Ivan Tham | 2021-06-05 10:15:50 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-06 12:30:18 +0000 |
commit | 40744ce8356cb9307f8cb9b2adf2c57b80b1ef9f (patch) | |
tree | 3fc2a99ecdeb9e027d7c093c660e8863622b46b2 /helix-core/src/movement.rs | |
parent | aa8a8baeeb06cd94ed6329c535483f30835ec426 (diff) |
Add ctrl-w in insert mode
It seemed to panic when I pressed too many times, but that is from
lsp side.
Diffstat (limited to 'helix-core/src/movement.rs')
-rw-r--r-- | helix-core/src/movement.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/helix-core/src/movement.rs b/helix-core/src/movement.rs index 297911ae..c5e2df4a 100644 --- a/helix-core/src/movement.rs +++ b/helix-core/src/movement.rs @@ -174,22 +174,22 @@ pub fn move_next_word_end(slice: RopeSlice, mut begin: usize, count: usize) -> O // used for by-word movement -fn is_word(ch: char) -> bool { +pub(crate) fn is_word(ch: char) -> bool { ch.is_alphanumeric() || ch == '_' } -fn is_horiz_blank(ch: char) -> bool { +pub(crate) fn is_horiz_blank(ch: char) -> bool { matches!(ch, ' ' | '\t') } #[derive(Debug, Eq, PartialEq)] -enum Category { +pub(crate) enum Category { Whitespace, Eol, Word, Punctuation, } -fn categorize(ch: char) -> Category { +pub(crate) fn categorize(ch: char) -> Category { if ch == '\n' { Category::Eol } else if ch.is_ascii_whitespace() { |