Skip to content

Commit

Permalink
fix(chainMember): do not ignore leading chain member
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 1, 2024
1 parent 73976a8 commit 1e3f14f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/various-textobjs/charwise-textobjs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,10 @@ function M.url() M.selectTextobj(M.urlPattern, "outer", config.lookForwardBig) e
---@param scope "inner"|"outer" inner excludes the leading dot
function M.chainMember(scope)
local patterns = {
"([:.])[%w_][%a_]-%b()()", -- with call
"([:.])[%w_][%a_]*()", -- without call
"()[%w_][%w_]-([:.])", -- leading member w/o call
"()[%w_][%w_]-%b()([:.])", -- leading member w/o call
"([:.])[%w_][%w_]-()", -- following member w/ call
"([:.])[%w_][%w_]-%b()()", -- following member w/ call
}
M.selectTextobj(patterns, scope, config.lookForwardSmall)
end
Expand Down

0 comments on commit 1e3f14f

Please sign in to comment.