aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Fischer <frank-fischer@shadow-soft.de>2015-09-28 16:34:42 +0200
committerFrank Fischer <frank-fischer@shadow-soft.de>2015-09-28 16:34:42 +0200
commiteabde2fe898fb9e28da3018255030905713a608a (patch)
treeba5ab20912238ab1448fcbc088f5776ff7162d72
parent2e3d919ccd6e348fb5664e67010dbb0ec78d9126 (diff)
parent21a2b9664036c858adde1ef1d427f485f554f496 (diff)
Merge stable
-rw-r--r--evil-command-window.el2
-rw-r--r--evil-commands.el8
-rw-r--r--evil-common.el48
-rw-r--r--evil-core.el2
-rw-r--r--evil-digraphs.el2
-rw-r--r--evil-ex.el2
-rw-r--r--evil-integration.el2
-rw-r--r--evil-macros.el2
-rw-r--r--evil-maps.el2
-rw-r--r--evil-pkg.el2
-rw-r--r--evil-repeat.el2
-rw-r--r--evil-search.el2
-rw-r--r--evil-states.el2
-rw-r--r--evil-tests.el14
-rw-r--r--evil-types.el2
-rw-r--r--evil-vars.el4
-rw-r--r--evil.el2
17 files changed, 58 insertions, 42 deletions
diff --git a/evil-command-window.el b/evil-command-window.el
index b087d8b..edbe8c0 100644
--- a/evil-command-window.el
+++ b/evil-command-window.el
@@ -2,7 +2,7 @@
;; Author: Emanuel Evans <emanuel.evans at gmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
diff --git a/evil-commands.el b/evil-commands.el
index 552f10d..7c0e190 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -2,7 +2,7 @@
;; Author: Vegard Øye <vegard_oye at hotmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
@@ -1065,7 +1065,7 @@ or line COUNT to the top of the window."
(evil-define-text-object evil-a-paragraph (count &optional beg end type)
"Select a paragraph."
:type line
- (evil-select-an-object 'evil-paragraph beg end type count))
+ (evil-select-an-object 'evil-paragraph beg end type count t))
(evil-define-text-object evil-inner-paragraph (count &optional beg end type)
"Select inner paragraph."
@@ -1594,9 +1594,9 @@ the current line."
(evil-shift-right (line-beginning-position) (line-beginning-position 2) count t))
(evil-define-command evil-shift-left-line (count)
- "Shift the current line COUNT times to the leeft.
+ "Shift the current line COUNT times to the left.
The text is shifted to the nearest multiple of
-`evil-shift-width'. Like `evil-shift-leeft' but always works on
+`evil-shift-width'. Like `evil-shift-left' but always works on
the current line."
(interactive "<c>")
(evil-shift-left (line-beginning-position) (line-beginning-position 2) count t))
diff --git a/evil-common.el b/evil-common.el
index ddc143b..55a21dc 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -2,7 +2,7 @@
;; Author: Vegard Øye <vegard_oye at hotmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
@@ -3002,22 +3002,36 @@ linewise, otherwise it is character wise."
(cond
((> dir 0) (goto-char end) (setq other beg))
(t (goto-char beg) (setq other end)))
- ;; if current is only selected object ...
- (when (and (= beg (car bnd)) (= end (cdr bnd)))
- (if objbnd
- ;; current match is thing, add whitespace
- (let ((wsend (evil-bounds-of-not-thing-at-point thing dir)))
- (if (not wsend) ;; no whitespace at end, try beginning
- (save-excursion
- (goto-char other)
- (setq wsend (evil-bounds-of-not-thing-at-point thing (- dir)))
- (when wsend (setq other wsend addcurrent t)))
- ;; add whitespace at end
- (goto-char wsend)
- (setq addcurrent t)))
- ;; current match is whitespace, add thing
- (forward-thing thing dir)
- (setq addcurrent t)))
+ (cond
+ ;; do nothing more than only current is selected
+ ((not (and (= beg (car bnd)) (= end (cdr bnd)))))
+ ;; current match is thing, add whitespace
+ (objbnd
+ (let ((wsend (evil-with-restriction
+ ;; restrict to current line if we do non-line selection
+ (and (not line) (line-beginning-position))
+ (and (not line) (line-end-position))
+ (evil-bounds-of-not-thing-at-point thing dir))))
+ (cond
+ (wsend
+ ;; add whitespace at end
+ (goto-char wsend)
+ (setq addcurrent t))
+ (t
+ ;; no whitespace at end, try beginning
+ (save-excursion
+ (goto-char other)
+ (setq wsend
+ (evil-with-restriction
+ ;; restrict to current line if we do non-line selection
+ (and (not line) (line-beginning-position))
+ (and (not line) (line-end-position))
+ (evil-bounds-of-not-thing-at-point thing (- dir))))
+ (when wsend (setq other wsend addcurrent t)))))))
+ ;; current match is whitespace, add thing
+ (t
+ (forward-thing thing dir)
+ (setq addcurrent t)))
;; possibly count current object as selection
(if addcurrent (setq count (1- count)))
;; move
diff --git a/evil-core.el b/evil-core.el
index 0fac746..cf9e938 100644
--- a/evil-core.el
+++ b/evil-core.el
@@ -2,7 +2,7 @@
;; Author: Vegard Øye <vegard_oye at hotmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
diff --git a/evil-digraphs.el b/evil-digraphs.el
index 3c9b982..8137b49 100644
--- a/evil-digraphs.el
+++ b/evil-digraphs.el
@@ -3,7 +3,7 @@
;; Author: Vegard Øye <vegard_oye at hotmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
diff --git a/evil-ex.el b/evil-ex.el
index 7b7802d..b29a015 100644
--- a/evil-ex.el
+++ b/evil-ex.el
@@ -3,7 +3,7 @@
;; Author: Frank Fischer <frank fischer at mathematik.tu-chemnitz.de>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
diff --git a/evil-integration.el b/evil-integration.el
index 5313760..ef4fc34 100644
--- a/evil-integration.el
+++ b/evil-integration.el
@@ -3,7 +3,7 @@
;; Author: Vegard Øye <vegard_oye at hotmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
diff --git a/evil-macros.el b/evil-macros.el
index 188042c..404e347 100644
--- a/evil-macros.el
+++ b/evil-macros.el
@@ -3,7 +3,7 @@
;; Author: Vegard Øye <vegard_oye at hotmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
diff --git a/evil-maps.el b/evil-maps.el
index 10eaa80..19ab074 100644
--- a/evil-maps.el
+++ b/evil-maps.el
@@ -3,7 +3,7 @@
;; Author: Vegard Øye <vegard_oye at hotmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
diff --git a/evil-pkg.el b/evil-pkg.el
index 8ce9bfe..f59412f 100644
--- a/evil-pkg.el
+++ b/evil-pkg.el
@@ -1,6 +1,6 @@
(define-package
"evil"
- "1.2.3"
+ "1.2.5"
"Extensible Vi layer for Emacs."
'((undo-tree "0.6.3")
(goto-chg "1.6")))
diff --git a/evil-repeat.el b/evil-repeat.el
index d40fbae..88b329a 100644
--- a/evil-repeat.el
+++ b/evil-repeat.el
@@ -3,7 +3,7 @@
;; Author: Frank Fischer <frank.fischer at mathematik.tu-chemnitz.de>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
diff --git a/evil-search.el b/evil-search.el
index 45eccbe..ddea754 100644
--- a/evil-search.el
+++ b/evil-search.el
@@ -3,7 +3,7 @@
;; Author: Vegard Øye <vegard_oye at hotmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
diff --git a/evil-states.el b/evil-states.el
index 42d93af..aa44be0 100644
--- a/evil-states.el
+++ b/evil-states.el
@@ -3,7 +3,7 @@
;; Author: Vegard Øye <vegard_oye at hotmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
diff --git a/evil-tests.el b/evil-tests.el
index 2004c7a..1cc1925 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -3,7 +3,7 @@
;; Author: Vegard Øye <vegard_oye at hotmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
@@ -5956,7 +5956,7 @@ Below some empty line."))
(ert-deftest evil-test-paragraph-objects ()
"Test `evil-inner-paragraph' and `evil-a-paragraph'"
:tags '(evil text-object)
- (ert-info ("Select a paragraph")
+ (ert-info ("Select a paragraph with point at beginning")
(evil-test-buffer
"[;]; This buffer is for notes,
;; and for Lisp evaluation.
@@ -5968,7 +5968,8 @@ Below some empty line."))
;; and for Lisp evaluation.
\[]\n>\
;; This buffer is for notes,
-;; and for Lisp evaluation.")
+;; and for Lisp evaluation."))
+ (ert-info ("Select a paragraph with point at last line")
(evil-test-buffer
";; This buffer is for notes,
\[;]; and for Lisp evaluation.
@@ -5980,7 +5981,8 @@ Below some empty line."))
;; and for Lisp evaluation.
\[]\n>\
;; This buffer is for notes,
-;; and for Lisp evaluation.")
+;; and for Lisp evaluation."))
+ (ert-info ("Select a paragraph with point after paragraph")
(evil-test-buffer
";; This buffer is for notes,
;; and for Lisp evaluation.
@@ -7955,7 +7957,7 @@ maybe we need one line more with some text\n")
(evil-test-buffer
"there are two lines in this file\n[\n]and some whitespace between them"
("dao")
- "there are two lines in this file[a]nd some whitespace between them")
+ "there are two lines in this file\n[a]nd some whitespace between them")
(evil-test-buffer
"here are another two lines\n[\n]with a blank line between them"
("dio")
@@ -7964,7 +7966,7 @@ maybe we need one line more with some text\n")
(evil-test-buffer
"These two lines \n[\n]!have punctuation on them"
("dao")
- ("These two lines [!]have punctuation on them"))))
+ "These two lines \n[!]have punctuation on them")))
(provide 'evil-tests)
diff --git a/evil-types.el b/evil-types.el
index e79b9da..57d6b75 100644
--- a/evil-types.el
+++ b/evil-types.el
@@ -3,7 +3,7 @@
;; Author: Vegard Øye <vegard_oye at hotmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
diff --git a/evil-vars.el b/evil-vars.el
index 7eaa2ef..91bf33f 100644
--- a/evil-vars.el
+++ b/evil-vars.el
@@ -3,7 +3,7 @@
;; Author: Vegard Øye <vegard_oye at hotmail.com>
;; Maintainer: Vegard Øye <vegard_oye at hotmail.com>
-;; Version: 1.2.3
+;; Version: 1.2.5
;;
;; This file is NOT part of GNU Emacs.
@@ -1725,7 +1725,7 @@ Otherwise the previous command is assumed as substitute.")
(goto-char (point-min))
(buffer-substring (point-min) (line-end-position)))
;; no repo, use plain version
- (t "1.2.3")))))
+ (t "1.2.5")))))
"The current version of Evil")
(defun evil-version ()
diff --git a/evil.el b/evil.el
index e5b4a51..8738149 100644
--- a/evil.el
+++ b/evil.el
@@ -47,7 +47,7 @@
;; To get in touch, please use the bug tracker or the
;; mailing list (see below).
;; Created: 2011-03-01
-;; Version: 1.2.3
+;; Version: 1.2.5
;; Keywords: emulation, vim
;; URL: http://gitorious.org/evil
;; Repository: git://gitorious.org/evil/evil.git