summaryrefslogtreecommitdiff
path: root/lisp/rect.el
diff options
context:
space:
mode:
authorBastien Guerry <bzg@gnu.org>2014-01-13 11:55:22 +0100
committerBastien Guerry <bzg@gnu.org>2014-01-13 11:55:22 +0100
commitd791cc3bc2781435f7b54fb9b45c690c7e4e0ee6 (patch)
treeeeea873b6b5bbb88cc964c33c1d08456696a8aa1 /lisp/rect.el
parent6a1f3c119c3a67e781eacbd0756db83ba365c185 (diff)
downloademacs-d791cc3bc2781435f7b54fb9b45c690c7e4e0ee6.tar.gz
Partially fix Bug#16403.
* rect.el (rectangle-mark-mode): When the region is not active, display a message saying that the mark as been set and that rectangle mode is in use. (rectangle--highlight-for-redisplay): Only put an overlay with a visible vertical bar when (display-graphic-p) is non-nil. This partially fixes Bug#16403.
Diffstat (limited to 'lisp/rect.el')
-rw-r--r--lisp/rect.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/rect.el b/lisp/rect.el
index f1f0b8dd9de..e798b07b556 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -444,7 +444,8 @@ Activates the region if needed. Only lasts until the region is deactivated."
(lambda () (rectangle-mark-mode -1)))
(unless (region-active-p)
(push-mark)
- (activate-mark))))
+ (activate-mark)
+ (message "Mark set (rectangle mode)"))))
(defun rectangle--extract-region (orig &optional delete)
(if (not rectangle-mark-mode)
@@ -553,10 +554,10 @@ Activates the region if needed. Only lasts until the region is deactivated."
(overlay-put ol 'after-string str))))
((overlay-get ol 'after-string)
(overlay-put ol 'after-string nil)))
- (when (= leftcol rightcol)
+ (when (and (= leftcol rightcol) (display-graphic-p))
;; Make zero-width rectangles visible!
- (overlay-put ol 'after-string
- (concat (propertize " "
+ (overlay-put ol 'after-string
+ (concat (propertize " "
'face '(region (:height 0.2)))
(overlay-get ol 'after-string))))
(push ol nrol)