summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emulation/cua-rect.el2
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 53707b23670..3a53d8f9ce5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-25 Glenn Morris <rgm@gnu.org>
+
+ * emulation/cua-rect.el (cua--highlight-rectangle):
+ Avoid error at point-min. (Bug#18309)
+
2014-08-18 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/python.el (python-shell-prompt-detect): Remove redundant
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index 31dd137a6b9..4620b0e8c0f 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -794,7 +794,7 @@ If command is repeated at same position, delete the rectangle."
(make-string
(- l cl0 (if (and (= le pl) (/= le lb)) 1 0))
(if cua--virtual-edges-debug ?. ?\s))
- 'face (or (get-text-property (1- s) 'face) 'default)))
+ 'face (or (get-text-property (max (1- s) (point-min)) 'face) 'default)))
(if (/= pl le)
(setq s (1- s))))
(cond