Adapt selection-info function to evil

This commit is contained in:
syl20bnr 2015-02-27 23:14:11 -05:00
parent 0146175023
commit 18c966ee18

View file

@ -2003,10 +2003,10 @@ Put (global-hungry-delete-mode) in dotspacemacs/config to enable by default."
(defun selection-info ()
"String holding the number of columns in the selection
if it covers only one line, else number of lines in the selection"
(let* ((lines (count-lines (region-beginning) (region-end)))
(chars (- (region-end) (region-beginning))))
(number-to-string (if (> lines 1) lines chars)))
)
(let* ((lines (count-lines (region-beginning) (1+ (region-end))))
(chars (- (1+ (region-end)) (region-beginning))))
(if (> lines 1) (format "%s lines" (number-to-string lines))
(format "%s chars" (number-to-string chars)))))
(defun spacemacs/mode-line-prepare-right ()
(let* ((active (powerline-selected-window-active))