unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: Daniel Colascione <dancol@dancol.org>
Cc: Ivan Kalyaev <ivan.kalyaev@gmail.com>, 16403@debbugs.gnu.org
Subject: bug#16403: 24.3.50; Rectangular selection visually disturbing
Date: Fri, 10 Jan 2014 20:58:33 +0100	[thread overview]
Message-ID: <87sisvehhy.fsf@bzg.ath.cx> (raw)
In-Reply-To: <52CF105B.5090005@dancol.org> (Daniel Colascione's message of "Thu, 09 Jan 2014 13:10:51 -0800")

[-- Attachment #1: Type: text/plain, Size: 818 bytes --]

Daniel Colascione <dancol@dancol.org> writes:

> On 01/09/2014 02:15 AM, Ivan Kalyaev wrote:
>> When I press <C-x SPS> to start vertical selection lines of text shift to the
>> right because empty selection is represented with a line symbol.
>>
>> It looked like font rendering glitch at first. The jerky motion is disturbing.
>>
>> How do you think the visual experience could be made better?
>>
>> For comparison, vim selects the starting character right away.
>
> I usually use Emacs in a window system. In a tty, yes, this behavior
> looks bad. We should do something about it.

I suggest these fixes (see patch attached):

- don't display an after-string overlay in tty;

- Let C-x SPC sends this message to the user:
  "Mark active (rectangle mode)"
  instead of just "Mark active"

Let me know what you think.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rect.el.patch --]
[-- Type: text/x-diff, Size: 1273 bytes --]

diff --git a/lisp/rect.el b/lisp/rect.el
index f1f0b8d..3d890b5 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) (window-system))
                 ;; 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)

[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
 Bastien

  parent reply	other threads:[~2014-01-10 19:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 10:15 bug#16403: 24.3.50; Rectangular selection visually disturbing Ivan Kalyaev
2014-01-09 21:10 ` Daniel Colascione
2014-01-10 11:28   ` Ivan Kalyaev
2014-01-10 19:58   ` Bastien [this message]
2014-01-10 20:16     ` Eli Zaretskii
2014-01-10 20:20       ` Bastien
2014-01-10 23:57         ` Stefan Monnier
2014-01-11 10:02           ` Bastien
2014-01-12 20:03             ` Stefan Monnier
2014-01-12 22:26               ` Bastien
2014-01-13  4:00                 ` Stefan Monnier
2014-01-13 10:57                 ` Bastien
2016-08-09  1:45                   ` npostavs
2016-09-02  3:09                     ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sisvehhy.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=16403@debbugs.gnu.org \
    --cc=dancol@dancol.org \
    --cc=ivan.kalyaev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).