aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorOmnikar2021-11-08 00:54:39 +0000
committerGitHub2021-11-08 00:54:39 +0000
commita252ecd8c85af5cc16638a4752011e2e920fa652 (patch)
treed0622202026845b6e95a2814cb72885fa5049b59 /helix-term/src
parente0e227d172697c0d3c418704fd20e780ee1a1032 (diff)
Add WORD textobject (#991)
* Add WORD textobject * Document WORD textobject
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands.rs3
-rw-r--r--helix-term/src/ui/prompt.rs1
2 files changed, 3 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 80cbd6d2..5f091775 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -4672,7 +4672,8 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
let selection = doc.selection(view.id).clone().transform(|range| {
match ch {
- 'w' => textobject::textobject_word(text, range, objtype, count),
+ 'w' => textobject::textobject_word(text, range, objtype, count, false),
+ 'W' => textobject::textobject_word(text, range, objtype, count, true),
'c' => textobject_treesitter("class", range),
'f' => textobject_treesitter("function", range),
'p' => textobject_treesitter("parameter", range),
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index c999ba14..29ca18b1 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -491,6 +491,7 @@ impl Component for Prompt {
doc.selection(view.id).primary(),
textobject::TextObject::Inside,
1,
+ false,
);
let line = text.slice(range.from()..range.to()).to_string();
if !line.is_empty() {