You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the result of another oddity with thingatpt.el. Movement for ]] is done in terms of evil-defun (which is like a regular defun except that movement signals whether it's been successful or not) and generally done with evil-forward-beginning. In the case you describe it first goes to the end of the evil-defun at point, then moves to the end of the next one with forward-thing, then back to the beginning of the next one with beginning-of-thing. The last step fails for your test data, to reproduce go to the last newline and evaluate M-: (bounds-of-thing-at-point 'evil-defun).
I'm not sure whether evil can do anything about this, other than trying to move back until it's possible to navigate by a defun. This might be the fault of markdown-mode if their functions for beginning-of-defun and end-of-defun are suboptimal. Can you reproduce this problem with other modes defining those?
Markdown mode is the only mode where I've noticed this behaviour.
I can think of C mode which has its own beginning-of-defun and end-of-defun, but it does not suffer from this issue.
Issue type
Environment
Emacs version: GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10) of 2017-04-22
Operating System: Arch Linux
Evil version: 1.2.12
Evil installation type: MELPA
Graphical/Terminal: Graphical
Terminal multiplexer: No.
Reproduction steps
Expected behavior
Pressing
]]
should place the point on the first '#' of the next markdown header.Actual behavior
Pressing
]]
when the point is after the third-to-last section (header 1
in the example), the point is moved beyond its expected location.The text was updated successfully, but these errors were encountered: