diff options
| author | Frank Fischer <frank-fischer@shadow-soft.de> | 2015-04-11 22:31:30 +0200 |
|---|---|---|
| committer | Frank Fischer <frank-fischer@shadow-soft.de> | 2015-04-11 22:31:30 +0200 |
| commit | 067379583e445e02efb8aaf5e4bfcf6c284147cd (patch) | |
| tree | 3443c9e53f5befa0a32d62b22f970f7a7cd47b36 | |
| parent | 4ecf042d7a324558cd505ee058fc198801100857 (diff) | |
fix bounds error in `evil-shift-right` (fix #512)
When shifting left point must not be moved to column less than 0.
| -rw-r--r-- | evil-commands.el | 2 | ||||
| -rw-r--r-- | evil-vars.el | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/evil-commands.el b/evil-commands.el index fab8433..66c5b7e 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -1556,7 +1556,7 @@ See also `evil-shift-left'." ;; assuming that point is in the first line, adjust its position (if (called-interactively-p 'any) (evil-first-non-blank) - (move-to-column (+ pnt-indent first-shift))))) + (move-to-column (max 0 (+ pnt-indent first-shift)))))) (evil-define-command evil-shift-right-line (count) "Shift the current line COUNT times to the right. diff --git a/evil-vars.el b/evil-vars.el index 868472d..11c47f0 100644 --- a/evil-vars.el +++ b/evil-vars.el @@ -938,14 +938,14 @@ available for completion." (defface evil-ex-commands '(( nil :underline t :slant italic)) - "Face for the evil command in completion in ex mode." - :group 'evil) + "Face for the evil command in completion in ex mode." + :group 'evil) (defface evil-ex-info '(( ((supports :slant)) :slant italic :foreground "red")) - "Face for the info message in ex mode." - :group 'evil) + "Face for the info message in ex mode." + :group 'evil) (defcustom evil-ex-visual-char-range nil "Type of default ex range in visual char state. @@ -1047,22 +1047,22 @@ specified, then is works only on the first match." :group 'evil) (defface evil-ex-search '((t :inherit isearch)) - "Face for interactive search." - :group 'evil) + "Face for interactive search." + :group 'evil) (defface evil-ex-lazy-highlight '((t :inherit lazy-highlight)) - "Face for highlighting all matches in interactive search." - :group 'evil) + "Face for highlighting all matches in interactive search." + :group 'evil) (defface evil-ex-substitute-matches '((t :inherit lazy-highlight)) - "Face for interactive substitute matches." - :group 'evil) + "Face for interactive substitute matches." + :group 'evil) (defface evil-ex-substitute-replacement '((((supports :underline)) :underline t :foreground "red")) - "Face for interactive replacement text." - :group 'evil) + "Face for interactive replacement text." + :group 'evil) (defcustom evil-command-window-height 8 "Height (in lines) of the command line window. |
