mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(ruby-ts-add-log-current-function): Fix when between two methods
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-add-log-current-function): Fix the case when point is between two methods. 'treesit-node-at' returs the 'def' node of the method after point in such case, so it behaved like point was inside the method below. * test/lisp/progmodes/ruby-ts-mode-tests.el (ruby-ts-add-log-current-method-outside-of-method): Update the test case. * test/lisp/progmodes/ruby-mode-tests.el (ruby-add-log-current-method-outside-of-method): Mirror that change.
This commit is contained in:
parent
da69f116bf
commit
0d98fac6bb
3 changed files with 12 additions and 1 deletions
|
|
@ -537,9 +537,12 @@ VALUES-PLIST is a list with alternating index and value elements."
|
|||
| def foo
|
||||
| end
|
||||
| _
|
||||
| def bar
|
||||
| end
|
||||
| end
|
||||
|end")
|
||||
(search-backward "_")
|
||||
(delete-char 1)
|
||||
(should (string= (ruby-add-log-current-method)"M::C"))))
|
||||
|
||||
(ert-deftest ruby-add-log-current-method-in-singleton-class ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue