aboutsummaryrefslogtreecommitdiff
path: root/evil-common.el
diff options
context:
space:
mode:
authorJustin Burkett <justin@burkett.cc>2019-08-11 21:37:30 -0400
committerEivind Fonn <evfonn@gmail.com>2019-11-05 10:20:42 +0100
commit92102f3b30d03d1d87b34ae2c01e4bc2013d5129 (patch)
tree4448f7cbb439f2b7b8010df85481267e7f15007a /evil-common.el
parentaa3ea1dcfc54fe25581841a8685679d482e99b3f (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.
Diffstat (limited to 'evil-common.el')
-rw-r--r--evil-common.el7
1 files changed, 3 insertions, 4 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.