Skip to content

Commit

Permalink
fixed: minor bug comment to the line v1.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Bin committed Oct 21, 2014
1 parent 487e1cd commit a88146b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.org
@@ -1,4 +1,4 @@
* evil-nerd-commenter (v1.5.6)
* evil-nerd-commenter (v1.5.7)

*This program could be used independently WITHOUT evil-mode!*

Expand Down
2 changes: 1 addition & 1 deletion evil-nerd-commenter-pkg.el
@@ -1,2 +1,2 @@
(define-package "evil-nerd-commenter" "1.5.6"
(define-package "evil-nerd-commenter" "1.5.7"
"Comment/uncomment lines efficiently. Like Nerd Commenter in Vim")
17 changes: 11 additions & 6 deletions evil-nerd-commenter.el
Expand Up @@ -4,7 +4,7 @@

;; Author: Chen Bin <chenbin.sh@gmail.com>
;; URL: http://github.com/redguardtoo/evil-nerd-commenter
;; Version: 1.5.6
;; Version: 1.5.7
;; Keywords: commenter vim line evil
;;
;; This file is not part of GNU Emacs.
Expand Down Expand Up @@ -308,11 +308,16 @@

(defun evilnc--find-dst-line-num (UNITS)
(let ((cur-line-num (evilnc--current-line-num))
dst-line-num)
(if (>= (mod cur-line-num 10) UNITS)
(setq UNITS (+ UNITS 10))
dst-line-num
(r 1)
(l (length (number-to-string UNITS))))
(while (> l 0)
(setq r (* r 10))
(setq l (- l 1)))
(if (>= (mod cur-line-num r) UNITS)
(setq UNITS (+ UNITS r))
)
(setq dst-line-num (+ cur-line-num (- UNITS (mod cur-line-num 10))))
(setq dst-line-num (+ cur-line-num (- UNITS (mod cur-line-num r))))
))

;; ==== below this line are public commands
Expand Down Expand Up @@ -494,7 +499,7 @@ or 'C-u 3 M-x evilnc-quick-comment-or-uncomment-to-the-line' to comment to the l
;;;###autoload
(defun evilnc-version ()
(interactive)
(message "1.5.6"))
(message "1.5.7"))

;;;###autoload
(defun evilnc-default-hotkeys ()
Expand Down
2 changes: 1 addition & 1 deletion pkg.sh
@@ -1,5 +1,5 @@
#!/bin/bash
pkg=evil-nerd-commenter-1.5.6
pkg=evil-nerd-commenter-1.5.7
mkdir $pkg
cp README.org $pkg
cp *.el $pkg
Expand Down

0 comments on commit a88146b

Please sign in to comment.