Permalink
Browse files

If point is at beginning of line when dragging the region, don't incl…

…ude that line
  • Loading branch information...
amalloy committed May 29, 2011
1 parent 47a711b commit ca3856faf53b379a2bfc7adc681a800352cbf093
Showing with 3 additions and 0 deletions.
  1. +3 −0 drag-things.el
View
@@ -136,6 +136,9 @@ mark is active, it will be left active."
((region-active-p)
(let (deactivate-mark)
+ (when (and (bolp) ; don't move line if point is at its start
+ (> (point) (mark)))
+ (backward-char))
(drag-region-lines (region-beginning) (region-end) arg)
(when drag-line-reindents

0 comments on commit ca3856f

Please sign in to comment.