From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Evgeny Zajcev Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix display box cursor under image with margins Date: Sat, 25 Apr 2020 16:57:11 +0300 Message-ID: References: <83imhwk7sr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000716b0d05a41ddcc1" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="21975"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 25 15:58:37 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jSLKH-0005ba-9s for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Apr 2020 15:58:37 +0200 Original-Received: from localhost ([::1]:37662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSLKG-0007Cp-BZ for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Apr 2020 09:58:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35466) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSLJH-0005bv-0d for emacs-devel@gnu.org; Sat, 25 Apr 2020 09:57:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSLJG-0006ur-Bq for emacs-devel@gnu.org; Sat, 25 Apr 2020 09:57:34 -0400 Original-Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]:45677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSLJ7-0005ny-2o; Sat, 25 Apr 2020 09:57:25 -0400 Original-Received: by mail-lf1-x143.google.com with SMTP id f8so10066969lfe.12; Sat, 25 Apr 2020 06:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4Sgcw/CsJNRorssc2ZJlgH9En9Yiq1HXN15BUNiSXsI=; b=RatP/rdJUNaDNHXfesfI499uD1Dx2ud3NztQ65bKCE9/q6z9Kvp6UXdnQszUpe0EKV Xd2CdBAsoDCwI4S+5or5YSgHO+aA7W2EVBSOwCw73uwsBfMxtbHhXW3K/OROD/Va/Ei8 7IVtfgUGOXtZqNC0a8ZQk8BGXjRAoOSbRoZ/fVjTMvJDHqyNTb4B5JmALmZZwcWAsgDq btRjqE5p0f4YT7/A0qfE0jXKyX3b+xtDhqLBCSh2a3OPx/CpC5JnFoBz5p/XMkqxNoHQ NbO5G74MX20sk91XkXHhfnB56wNt7LHTzEQz7y0/xlAxKIrLRJwtPrA13A49WYVJ/1Nh JBMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4Sgcw/CsJNRorssc2ZJlgH9En9Yiq1HXN15BUNiSXsI=; b=dnvZnM5y5+jcP/kxE0Wz0Q37OJTZ6DO7TRPqY+kFz3NfOQikv4SmAgU9PUrWGf343B Zjjdux43P+7ICWST5cDb73K4q+1Xu2XKGCwVR5rQ65PNEcDejiSBk4/dLR/j/01OBMHo RlcUq9hKcWrJr57o6NOLsgljPbPCXRQZUDfwt9xxo5q/Ofw6P0xCy6zutDGlMcuitkF+ /JhpnGLbGphbMjDyEvBM61GBun6MouMl6ipScuUhNy8nE2JZqsYjgSI0i18yRTIKzBo/ 39lvojr4cWV+9rbDpcRZ2Y3ejLJ+8gEvsTaomE4ixMGE1DKAhvS6Wr9QRfE4ZIInkeAu Bu7A== X-Gm-Message-State: AGi0PuawJ+K5MSdRbsDzlpbHYKfll8deARBQjXocfm02QgCUoVOnIhd8 pdI98fgxwaao3a2s08IjZVT6r0Vt9ctV1XD+DkA= X-Google-Smtp-Source: APiQypITHeMk7taHICAnMt0OzvDLckBmetCcguUjTEe+y/vguNE3Xn7Fyq/eIB0rtNIfz3Z2xzPlh9IsWeyWhgsR6EY= X-Received: by 2002:ac2:48b1:: with SMTP id u17mr9510881lfg.187.1587823042972; Sat, 25 Apr 2020 06:57:22 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::143; envelope-from=lg.zevlg@gmail.com; helo=mail-lf1-x143.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::143 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:247783 Archived-At: --000000000000716b0d05a41ddcc1 Content-Type: multipart/alternative; boundary="000000000000716b0605a41ddcbf" --000000000000716b0605a41ddcbf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D1=81=D0=B1, 25 =D0=B0=D0=BF=D1=80. 2020 =D0=B3. =D0=B2 15:09, Stefan Monn= ier : > > Here is first screenshot how hollow cursor looks on image with margin - > > http://lgarc.narod.ru/pics/emacs-hollow-cursor.png > > > > And here is how it looks with patch applied - > > http://lgarc.narod.ru/pics/emacs-box-cursor.png > > Would it be possible to keep the two thin horizontal lines when the > window is active? > > I figured out, how to do this in "easy" way. Here is patches update And screenshots: http://lgarc.narod.ru/pics/emacs-box-margin1.png http://lgarc.narod.ru/pics/emacs-box-margin2.png This patch introduces new cursor type - COMBINED_BOX_CURSOR (used only internally for box cursor under images with mask or margins) Thanks --=20 lg --000000000000716b0605a41ddcbf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
=D1=81=D0=B1, 25 =D0=B0=D0=BF=D1=80. = 2020 =D0=B3. =D0=B2 15:09, Stefan Monnier <monnier@iro.umontreal.ca>:
> Here is first screenshot how hollow c= ursor looks on image with margin -
> http://lgarc.narod.ru/pics/emacs-hollow-curso= r.png
>
> And here is how it looks with patch applied -
> http://lgarc.narod.ru/pics/emacs-box-cursor.png<= /a>

Would it be possible to keep the two thin horizontal lines when the
window is active?




This patch introduces new cursor t= ype - COMBINED_BOX_CURSOR (used only internally for box cursor under images= with mask or margins)

Thanks
<= br>--
lg
--000000000000716b0605a41ddcbf-- --000000000000716b0d05a41ddcc1 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Fix-display-box-cursor-under-image-with-margins.patch" Content-Disposition: attachment; filename="0001-Fix-display-box-cursor-under-image-with-margins.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k9fot5n90 RnJvbSBmNjNiZTU5YjBiZTQxZDBhOTZlYjgzZTFiYTI5MjZkMzMyMzExYmNhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBaYWpjZXYgRXZnZW55IDx6ZXZsZ0B5YW5kZXgucnU+CkRhdGU6 IFNhdCwgMTggQXByIDIwMjAgMjA6MjI6NDAgKzAzMDAKU3ViamVjdDogW1BBVENIIDEvMl0gRml4 IGRpc3BsYXkgYm94IGN1cnNvciB1bmRlciBpbWFnZSB3aXRoIG1hcmdpbnMKCiogc3JjL3hkaXNw LmMgKGdldF93aW5kb3dfY3Vyc29yX3R5cGUpOiBEbyBub3QgbWFrZSBib3ggY3Vyc29yIGhvbGxv dwppZiBjdXJzb3IgaXMgdW5kZXIgaW1hZ2Ugd2l0aCBhbnkgbWFyZ2luLgotLS0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V9DT0xVTU5fV0lEVEggKHcpKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJiYgaW1nLT5oZWlnaHQgPiBtYXggKCp3aWR0aCwgV0lORE9XX0ZSQU1F X0xJTkVfSEVJR0hUICh3KSkpKSkKIAkJICAgIGN1cnNvcl90eXBlID0gSE9MTE9XX0JPWF9DVVJT T1I7CiAJCX0KIAkgICAgfQotLSAKMi4xNy4xCgo= --000000000000716b0d05a41ddcc1 Content-Type: text/x-patch; charset="US-ASCII"; name="0002-New-COMBINED_BOX_CURSOR-cursor-type-introduced-for-i.patch" Content-Disposition: attachment; filename="0002-New-COMBINED_BOX_CURSOR-cursor-type-introduced-for-i.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k9fotchk1 RnJvbSBkOTVlN2M5OTJiNjJkMTdhMDE2MzcxNjVjYzU1MzBmZTQzNWFiM2E3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBaYWpjZXYgRXZnZW55IDx6ZXZsZ0B5YW5kZXgucnU+CkRhdGU6 IFNhdCwgMjUgQXByIDIwMjAgMTY6NTE6MDQgKzAzMDAKU3ViamVjdDogW1BBVENIIDIvMl0gTmV3 IENPTUJJTkVEX0JPWF9DVVJTT1IgY3Vyc29yIHR5cGUgaW50cm9kdWNlZCBmb3IKIGludGVybmFs IHVzZQoKKiBzcmMvZGlzcGV4dGVybi5oICh0ZXh0X2N1cnNvcl9raW5kcyk6IENPTUJJTkVEX0JP WF9DVVJTT1IgYWRkZWQKCiogc3JjL3czMnRlcm0uYywgc3JjL3h0ZXJtLmM6IFN1cHBvcnQgZm9y IENPTUJJTkVEX0JPWF9DVVJTT1IgY3Vyc29yCiAgdHlwZQoKKiBzcmMveGRpc3AuYyAoZ2V0X3dp bmRvd19jdXJzb3JfdHlwZSk6IFVzZSBDT01CSU5FRF9CT1hfQ1VSU09SIGZvcgogIGJveCBjdXJz b3IgdW5kZXIgaW1hZ2VzIHdpdGggbWFzayBv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X2dseXBoICh3LCBn bHlwaF9yb3csIERSQVdfQ1VSU09SKTsKKyAgICAgICAgICAgICAgLyogRkFMTFRIUk9VR0ggKi8K IAkgICAgY2FzZSBIT0xMT1dfQk9YX0NVUlNPUjoKIAkgICAgICB4X2RyYXdfaG9sbG93X2N1cnNv ciAodywgZ2x5cGhfcm93KTsKIAkgICAgICBicmVhazsKLS0gCjIuMTcuMQoK --000000000000716b0d05a41ddcc1--