diff options
| author | Justin Burkett <justin@burkett.cc> | 2019-08-11 21:37:30 -0400 |
|---|---|---|
| committer | Eivind Fonn <evfonn@gmail.com> | 2019-11-05 10:20:42 +0100 |
| commit | 92102f3b30d03d1d87b34ae2c01e4bc2013d5129 (patch) | |
| tree | 4448f7cbb439f2b7b8010df85481267e7f15007a | |
| parent | aa3ea1dcfc54fe25581841a8685679d482e99b3f (diff) | |
Remove force argument from evil-adjust-cursor
The conditions checked in the body of the function are sufficient to guarantee
that the cursor should move back so there is no need to check the variable
evil-move-cursor-back, which is what the force argument allows for.
| -rw-r--r-- | evil-common.el | 7 | ||||
| -rw-r--r-- | evil-macros.el | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/evil-common.el b/evil-common.el index 26b6b39..263de7e 100644 --- a/evil-common.el +++ b/evil-common.el @@ -973,10 +973,9 @@ Like `move-end-of-line', but retains the goal column." (move-end-of-line arg) (end-of-line))) -(defun evil-adjust-cursor (&optional force) +(defun evil-adjust-cursor (&optional _) "Move point one character back if at the end of a non-empty line. -This behavior is contingent on the variable `evil-move-cursor-back'; -use the FORCE parameter to override it." +This behavior is controled by `evil-move-beyond-eol'." (when (and (eolp) (not evil-move-beyond-eol) (not (bolp)) @@ -984,7 +983,7 @@ use the FORCE parameter to override it." (save-excursion (evil-move-end-of-line) (point)))) - (evil-move-cursor-back force))) + (evil-move-cursor-back t))) (defun evil-move-cursor-back (&optional force) "Move point one character back within the current line. diff --git a/evil-macros.el b/evil-macros.el index 66d550d..b820545 100644 --- a/evil-macros.el +++ b/evil-macros.el @@ -295,7 +295,7 @@ of the object; otherwise it is placed at the end of the object." (unless (bobp) (backward-char))) (when (or (evil-normal-state-p) (evil-motion-state-p)) - (evil-adjust-cursor t))))) + (evil-adjust-cursor))))) ((> count 0) (when (evil-eobp) (signal 'end-of-buffer nil)) @@ -310,7 +310,7 @@ of the object; otherwise it is placed at the end of the object." (unless (bobp) (backward-char))) (when (or (evil-normal-state-p) (evil-motion-state-p)) - (evil-adjust-cursor t))))) + (evil-adjust-cursor))))) (t count)))) |
