From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.bugs Subject: bug#16403: 24.3.50; Rectangular selection visually disturbing Date: Fri, 10 Jan 2014 20:58:33 +0100 Message-ID: <87sisvehhy.fsf@bzg.ath.cx> References: <52CF105B.5090005@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1389383956 22007 80.91.229.3 (10 Jan 2014 19:59:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jan 2014 19:59:16 +0000 (UTC) Cc: Ivan Kalyaev , 16403@debbugs.gnu.org To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 10 20:59:22 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W1iEi-0004mY-V4 for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Jan 2014 20:59:21 +0100 Original-Received: from localhost ([::1]:58785 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1iEi-00011n-KC for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Jan 2014 14:59:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1iEZ-0000xR-Md for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2014 14:59:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1iEQ-0003BQ-4z for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2014 14:59:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1iEQ-0003BJ-17 for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2014 14:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W1iEP-0004f3-QC for bug-gnu-emacs@gnu.org; Fri, 10 Jan 2014 14:59:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bastien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jan 2014 19:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16403 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16403-submit@debbugs.gnu.org id=B16403.138938392617892 (code B ref 16403); Fri, 10 Jan 2014 19:59:01 +0000 Original-Received: (at 16403) by debbugs.gnu.org; 10 Jan 2014 19:58:46 +0000 Original-Received: from localhost ([127.0.0.1]:45550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W1iE9-0004eW-HW for submit@debbugs.gnu.org; Fri, 10 Jan 2014 14:58:45 -0500 Original-Received: from mail-we0-f171.google.com ([74.125.82.171]:58870) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W1iE7-0004eF-0U for 16403@debbugs.gnu.org; Fri, 10 Jan 2014 14:58:43 -0500 Original-Received: by mail-we0-f171.google.com with SMTP id w61so929321wes.30 for <16403@debbugs.gnu.org>; Fri, 10 Jan 2014 11:58:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=Pzx1rj2x4bNOtpUVeUkJnZiAEqEoBw1CYTBPD3W82Hg=; b=jF/bMCpw4+9pwY1WydIJy08EXTpZvSRlTVdWIqTPR1Q7ZzFN9SxBosEthZzBSKIyFA 4hK+3xyideBtIlnj6iLzLq4w51tQtMYx1+/Kk4MRdM8nLeKB3nzlTVqNHz3JXLgrJPSB UFngBgp0SFUbWG+aQ/OydUmjSiK9nsE0PlAeLRNC6VP4w8KdAN6/UywxDufvtrGtY/6W J45n9mKbZX1I+253iFNDmv3dq3lFhXqnMJU+SIM2KRiQ0DHh4Ia5iuysolinWihiE6or lqocJCIi5FMrcCsbJ2fu7Jgu7fNzTVuoAPyklYw8GNpjTLtkoI9GYBSEYRwbDuuk/Z// zLSQ== X-Received: by 10.180.211.141 with SMTP id nc13mr4302783wic.47.1389383921828; Fri, 10 Jan 2014 11:58:41 -0800 (PST) Original-Received: from bzg.localdomain ([90.161.105.124]) by mx.google.com with ESMTPSA id cy10sm4989280wjb.6.2014.01.10.11.58.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jan 2014 11:58:40 -0800 (PST) Original-Received: by bzg.localdomain (Postfix, from userid 1000) id D7C3C1C20757; Fri, 10 Jan 2014 20:58:33 +0100 (CET) In-Reply-To: <52CF105B.5090005@dancol.org> (Daniel Colascione's message of "Thu, 09 Jan 2014 13:10:51 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83243 Archived-At: --=-=-= Content-Type: text/plain Daniel Colascione writes: > On 01/09/2014 02:15 AM, Ivan Kalyaev wrote: >> When I press 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. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=rect.el.patch 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) --=-=-= Content-Type: text/plain -- Bastien --=-=-=--