Skip to content

Commit

Permalink
fix(subword): edge case with single-uppercase-subwords
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 28, 2023
1 parent 1a188f6 commit e04943a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/various-textobjs/charwise-textobjs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ end
function M.subword(scope)
local pattern = {
"()%w[%l%d]+([_%- ]?)", -- camelCase or lowercase
"()[%u%d]+([_%- ]?)", -- UPPER_CASE or digits
"()%u[%u%d]+([_%- ]?)", -- UPPER_CASE
"()%d+([_%- ]?)", -- number
}
selectTextobj(pattern, scope, 0)
end
Expand Down

0 comments on commit e04943a

Please sign in to comment.