From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: TTY Vertical divider face? Date: Tue, 28 Jun 2005 10:25:56 +0200 Message-ID: References: <877jgroo1i.fsf@jurta.org> <87u0jr1xmd.fsf@jurta.org> <87mzpisgbe.fsf@jurta.org> <87slz3h0mg.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1119949839 26128 80.91.229.2 (28 Jun 2005 09:10:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2005 09:10:39 +0000 (UTC) Cc: snogglethorpe@gmail.com, emacs-devel@gnu.org, rms@gnu.org, miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 28 11:10:30 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DnC6k-00039X-5i for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2005 11:10:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DnCEY-0002Pc-9J for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2005 05:18:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DnBTu-0002mm-Vy for emacs-devel@gnu.org; Tue, 28 Jun 2005 04:30:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DnBTp-0002ld-9R for emacs-devel@gnu.org; Tue, 28 Jun 2005 04:30:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DnBTn-0002f7-10 for emacs-devel@gnu.org; Tue, 28 Jun 2005 04:30:03 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DnBUX-0004dP-39; Tue, 28 Jun 2005 04:30:49 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepa.post.tele.dk (Postfix) with SMTP id E2DB14802DB; Tue, 28 Jun 2005 10:26:13 +0200 (CEST) Original-To: Juri Linkov In-Reply-To: <87slz3h0mg.fsf@jurta.org> (Juri Linkov's message of "Tue, 28 Jun 2005 02:54:15 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:39768 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39768 Juri Linkov writes: >>> It makes sense to use the new `vertical-border' face not only >>> for defining a vertical divider on character terminals, but also >>> on X for defining the foreground color of the vertical thin line >>> between windows. >>> >>> That seems natural. >>> >>> Is that line present even when there is a scroll bar? >> >> Yes. > > I want also to fix the problem where the vertical border steals > 1 pixel from the text area of the right window. This makes some > letters indistinguishable. The patch below draws the vertical border > 1 pixel left when there are no scroll bars and no left fringes. > These screenshots demonstrate how the vertical border looks > before and after applying the patch: I think we need to address this problem, and your change may work -- but what happens if the window on the left has a scroll bar on the right? I have been considering the following approach: - if there are no scroll-bars, your approach is good. - if window has a scroll-bar on the left, reduce width of scroll-bar by one pixel, and put line on the left side of the scroll-bar. - if window has scroll-bar on the right, and the window on the left of this window also has scroll-bar on right, reduce width of other window's scroll-bar and put line on right side of that scroll-bar. - if window has scroll-bar on right, and window on the left has scroll-bar on left, don't show the vertical line (the dual scroll-bars next to each other is enough to show which window the scroll-bars belong to). Actually, in most cases, the scroll-bars are already a little narrower than a full multiple of the column width, so there may already be room for the vertical line without reducing the scroll-bar width. So although your change may give good results in most cases, I think there are cases where it may fail (if you happen to move the vertical line into an area occupied by a scroll bar... > > > > > > > Index: src/xdisp.c > =================================================================== > RCS file: /cvsroot/emacs/emacs/src/xdisp.c,v > retrieving revision 1.1028 > diff -c -r1.1028 xdisp.c > *** src/xdisp.c 25 Jun 2005 22:35:42 -0000 1.1028 > --- src/xdisp.c 27 Jun 2005 23:11:18 -0000 > *************** > *** 22400,22405 **** > --- 22400,22408 ---- > window_box_edges (w, -1, &x0, &y0, &x1, &y1); > y1 -= 1; > > + if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) > + x1 -= 1; > + > rif->draw_vertical_window_border (w, x1, y0, y1); > } > else if (!WINDOW_LEFTMOST_P (w) > *************** > *** 22410,22415 **** > --- 22413,22421 ---- > window_box_edges (w, -1, &x0, &y0, &x1, &y1); > y1 -= 1; > > + if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) > + x0 -= 1; > + > rif->draw_vertical_window_border (w, x0, y0, y1); > } > } > > -- > Juri Linkov > http://www.jurta.org/emacs/ -- Kim F. Storm http://www.cua.dk