; Use string-search instead of string-match[-p] in ruby-ts-mode.el
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--align-chain):
Use the much faster string-search when just searching for a substring.
(cherry picked from commit 0724c6dbda)
This commit is contained in:
committed by
Dmitry Gutov
parent
0337131bfa
commit
f631c90e79
@@ -469,7 +469,7 @@ non-nil."
|
||||
(let* (first-call )
|
||||
(while (and parent
|
||||
(setq first-call (treesit-node-parent parent))
|
||||
(string-match-p "call" (treesit-node-type first-call)))
|
||||
(string-search "call" (treesit-node-type first-call)))
|
||||
(setq parent first-call))
|
||||
(treesit-node-start (treesit-search-subtree parent "\\." nil t))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user