home
·
contact
·
privacy
projects
/
plomvi.el
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9ed9d03
)
Fix paste-forward behavior at end of buffer.
master
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 23 Oct 2019 22:21:59 +0000
(
00:21
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 23 Oct 2019 22:21:59 +0000
(
00:21
+0200)
plomvi.el
patch
|
blob
|
history
diff --git
a/plomvi.el
b/plomvi.el
index 28ede5060381314bbf3d3781146366e46a1aead4..bda484d7a1ac73ce63163fff32f1ae6adbe41e0a 100644
(file)
--- a/
plomvi.el
+++ b/
plomvi.el
@@
-128,14
+128,18
@@
Note that this ignores killed rectangles.
(defun plomvi-paste-forward ()
"Paste last kill rightwards in current line, or (if kill ends in \n) under it.
(defun plomvi-paste-forward ()
"Paste last kill rightwards in current line, or (if kill ends in \n) under it.
+Doesn't move rightwards before yanking if at end of buffer.
+
Note that this ignores killed rectangles."
(interactive)
(if (eq nil (string-match "\n$" (current-kill 0)))
(progn
Note that this ignores killed rectangles."
(interactive)
(if (eq nil (string-match "\n$" (current-kill 0)))
(progn
- (right-char)
+ (if (< (point) (point-max))
+ (right-char))
(yank))
(end-of-line)
(yank))
(end-of-line)
- (right-char)
+ (if (< (point) (point-max))
+ (right-char))
(yank)
(previous-line)))
(yank)
(previous-line)))