Commit d791cc3b authored by Bastien Guerry's avatar Bastien Guerry
Browse files

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.
parent 6a1f3c11
2014-01-13 Bastien Guerry <bzg@gnu.org>
* 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.
2014-01-13 Juri Linkov <juri@jurta.org> 2014-01-13 Juri Linkov <juri@jurta.org>
* info.el (Info-find-file): Go to DIR before displaying the error * info.el (Info-find-file): Go to DIR before displaying the error
......
...@@ -444,7 +444,8 @@ Activates the region if needed. Only lasts until the region is deactivated." ...@@ -444,7 +444,8 @@ Activates the region if needed. Only lasts until the region is deactivated."
(lambda () (rectangle-mark-mode -1))) (lambda () (rectangle-mark-mode -1)))
(unless (region-active-p) (unless (region-active-p)
(push-mark) (push-mark)
(activate-mark)))) (activate-mark)
(message "Mark set (rectangle mode)"))))
(defun rectangle--extract-region (orig &optional delete) (defun rectangle--extract-region (orig &optional delete)
(if (not rectangle-mark-mode) (if (not rectangle-mark-mode)
...@@ -553,10 +554,10 @@ Activates the region if needed. Only lasts until the region is deactivated." ...@@ -553,10 +554,10 @@ Activates the region if needed. Only lasts until the region is deactivated."
(overlay-put ol 'after-string str)))) (overlay-put ol 'after-string str))))
((overlay-get ol 'after-string) ((overlay-get ol 'after-string)
(overlay-put ol 'after-string nil))) (overlay-put ol 'after-string nil)))
(when (= leftcol rightcol) (when (and (= leftcol rightcol) (display-graphic-p))
;; Make zero-width rectangles visible! ;; Make zero-width rectangles visible!
(overlay-put ol 'after-string (overlay-put ol 'after-string
(concat (propertize " " (concat (propertize " "
'face '(region (:height 0.2))) 'face '(region (:height 0.2)))
(overlay-get ol 'after-string)))) (overlay-get ol 'after-string))))
(push ol nrol) (push ol nrol)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment