Skip to content

Commit

Permalink
fix(subword): do not skip single character subwords (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 3, 2024
1 parent f7e23bd commit 3c327fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/various-textobjs/charwise-textobjs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function M.subword(scope)
"()%w[%l%d]+([_-]?)", -- camelCase or lowercase
"()%u[%u%d]+([_-]?)", -- UPPER_CASE
"()%d+([_-]?)", -- number
"()%a([_-]?)", -- single char subwords like "xSide" or "sideX", see #75
}
local startPos, endPos = M.selectClosestTextobj(pattern, scope, 0)

Expand Down

0 comments on commit 3c327fe

Please sign in to comment.