[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 54bce2c 036/110: avy.el (avy-move-region): Update
From: |
Oleh Krehel |
Subject: |
[elpa] master 54bce2c 036/110: avy.el (avy-move-region): Update |
Date: |
Sat, 11 May 2019 10:15:38 -0400 (EDT) |
branch: master
commit 54bce2cfb07aab6c0b2a5a9d22c9df748649fecd
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
avy.el (avy-move-region): Update
Fixes #188
---
avy.el | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/avy.el b/avy.el
index be317ba..00720fa 100644
--- a/avy.el
+++ b/avy.el
@@ -1481,21 +1481,23 @@ The window scope is determined by `avy-all-windows' or
;;;###autoload
(defun avy-move-region ()
- "Select two lines and move the text between them here."
+ "Select two lines and move the text between them above the current line."
(interactive)
(avy-with avy-move-region
(let* ((initial-window (selected-window))
(beg (avy--line))
- (end (save-excursion
- (goto-char (avy--line))
- (forward-line)
- (point)))
- (text (buffer-substring beg end))
- (pad (if (bolp) "" "\n")))
+ (end (avy--line))
+ text)
+ (when (> beg end)
+ (cl-rotatef beg end))
+ (setq end (save-excursion
+ (goto-char end)
+ (1+ (line-end-position))))
+ (setq text (buffer-substring beg end))
(move-beginning-of-line nil)
(delete-region beg end)
(select-window initial-window)
- (insert text pad))))
+ (insert text))))
;;;###autoload
(defun avy-kill-region (arg)
- [elpa] master 0ed6408 043/110: avy.el: Fix checkdoc warnings, (continued)
- [elpa] master 0ed6408 043/110: avy.el: Fix checkdoc warnings, Oleh Krehel, 2019/05/11
- [elpa] master 36f768d 047/110: avy.el (avy-words): Specify custom type, Oleh Krehel, 2019/05/11
- [elpa] master 9103291 048/110: Update description to be easier to understand., Oleh Krehel, 2019/05/11
- [elpa] master f4c45d3 044/110: avy.el: Add org-mode commands for jumping to and refiling headings, Oleh Krehel, 2019/05/11
- [elpa] master 4af1993 053/110: avy.el (avy-read): Update avy-current-path before returning, Oleh Krehel, 2019/05/11
- [elpa] master 176f34f 051/110: avy.el (avy-handler-default): Error msg on mouse clicks, Oleh Krehel, 2019/05/11
- [elpa] master 8556274 045/110: avy.el (avy-org-goto-heading-timer): Simplify, Oleh Krehel, 2019/05/11
- [elpa] master 83859c3 040/110: avy.el: Add new avy-style to use words as sequences, Oleh Krehel, 2019/05/11
- [elpa] master 240d717 041/110: Makefile: Add target checkdoc to check documentation guidelines of lisp files, Oleh Krehel, 2019/05/11
- [elpa] master 3980c03 035/110: avy.el (avy-move-region): Insert in original window, Oleh Krehel, 2019/05/11
- [elpa] master 54bce2c 036/110: avy.el (avy-move-region): Update,
Oleh Krehel <=
- [elpa] master 49b070d 042/110: avy-test.el: Fix checkdoc warnings, Oleh Krehel, 2019/05/11
- [elpa] master 228ed97 039/110: avy.el (avy-action-teleport): Add and bind to "t", Oleh Krehel, 2019/05/11
- [elpa] master f2bedee 038/110: Allow "C-h" to delete for avy-goto-char-timer, Oleh Krehel, 2019/05/11
- [elpa] master d609eb9 033/110: Add avy-goto-word-0-below and avy-goto-word-0-above, Oleh Krehel, 2019/05/11
- [elpa] master b8d7163 032/110: avy.el (avy-action-goto): Add raise-frame, Oleh Krehel, 2019/05/11
- [elpa] master 07153e4 026/110: Add kill and save region functionality., Oleh Krehel, 2019/05/11
- [elpa] master dd112c8 027/110: avy.el (avy-goto-subword-1): Check char-after, Oleh Krehel, 2019/05/11
- [elpa] master 0c30cdb 034/110: avy.el (avy-action-yank): Add and bind to "y", Oleh Krehel, 2019/05/11
- [elpa] master c911850 031/110: avy.el (avy--overlay-at-full): Fix for visual-line-mode, Oleh Krehel, 2019/05/11
- [elpa] master 5515f28 021/110: Allow using symbols instead of words in word cmds, Oleh Krehel, 2019/05/11