From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id E5E7F24543 for ; Tue, 14 May 2024 02:04:52 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1715645092; b=BO+M1TxeRsW1CHhwO05y8oJxh7yEKTD3XP6j+lA1LKg99rcySLQ7KKOkL++fahKQyQlhFdqOfH RBamXT300eOgXcB5nVbggUyX+1wNyZFDwtQNn6quwBGhejo4YmRiBlgijxBwRGshhWqUBA8Dyn 3PE9a6qKQ0HY0Ft4/I7Mhn8VjpGfZBoIHwue6qLqYyAUfpHfm+ZmWab1MiHrFQe5UTRPxhus+v dNa1ZRgmORalCgjVZzmNyVYuFEHt1aMcZuR3miTx0dSbBOtE11DZOEUoQCiY9yV8CLCkiCn4mj S/BLduwwd1xA6oeFl/xwvrQXdEATmqiyYNeSBXp1ZxhSYg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f44.google.com) smtp.remote-ip=209.85.210.44; dkim=pass header.d=warp-dev.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=warp.dev; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1715645092; bh=B+ZAp3yR5FOlMY7RMemCytyyhbSY2xWM2+Y8r9ZXi0Y=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=fGGhuHW78qqEmcuVcZxHKiA/kWfuD+YZPfp2pgvol4s9TizP5w7IFNpxUUiR+252f8LC5AhbDL kTfjr0/0k+daTt9ef4I9Pum8oose/BzLgJ9Rs5dRUkujnTYhp/tBCjX7TRjICyaoAzTfCfbP8H e0Q/oJ3xTViHWB0U+yVUhwMaz8Fte2r/kfmXLBMG59dBlOZ3HfXlHs/Td2bDY8B4iEeiF3EFkA XNCPnRzkIU9n0yRLl/HFSBq7Mtb4xmE13MdsWZd8tTeFEo7U0egoMw1uLTyeyNu2Ft5a+NN/kN RxQCPtmo1g3QloZL/Vd7LkPpuwWHeDUmH39wjJBj1C/7qQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=izF5rtMCrzYW+6dSTB8zoeJ8j1Cn/UiMTq5solKkXpk=; b=Bu/1OhxS4tCNgBnVp/r8TZ2OYT C5H5AObawSGmZSBJCDcnS7y0tsdSnsOAx9BDRXfQZijGIGQUGC4jENAM43HijtXuRljkAZZLQl45J Rgux8w4HmpBxiGJZnZroP3NuK+OawWYoAHABTdWSd2qMd9O2Q4MVRoeUOJaNMxkPQPp9ftWIlaeRM EA0pPFcLgJndk979WDjPi7TBK3kEAXXWjw1LKxe/HAZ3OYxk6B3t6QQ5PVIuhb4tY9v7hdsAIWv1h TO049Y4IqUYs+tdoIZO0frDi04MIrZAJT0dxSgXVIojpbPTp7nf6Z/QvxVTpDwem04LJ1Fbwm/Aww YrUV0UBQ==; Received: by zero.zsh.org with local id 1s6ff0-000PV4-Nq; Tue, 14 May 2024 00:04:50 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f44.google.com) smtp.remote-ip=209.85.210.44; dkim=pass header.d=warp-dev.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=warp.dev; arc=none Received: from mail-ot1-f44.google.com ([209.85.210.44]:47438) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1s6feQ-000PAy-Kn; Tue, 14 May 2024 00:04:15 +0000 Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-6f0f5633a45so1570913a34.3 for ; Mon, 13 May 2024 17:04:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warp-dev.20230601.gappssmtp.com; s=20230601; t=1715645053; x=1716249853; darn=zsh.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=izF5rtMCrzYW+6dSTB8zoeJ8j1Cn/UiMTq5solKkXpk=; b=N3QVbWA7SaZpjQxKLdO+OSJHRwVMRPnxS7YgOtvC9fq3N5MOXpL5JTEKqFvRMHap0h motOxqgGtjiD13JJ9upFpHI77M3yoeG0V46VXaeMcjz4jD/0aIipqqn1FXbDGfNzJgsS qwM7DhXWLgL15FVCnLE4mzbJvCZ5iYca3tVtM6jO0v/glfPVtH/QnDolyCkMGnzop4ha +uc8CKT+FlCLIPCdZ3JNeqmBcc8SHdzJd1fm20tB/0eEBeLWlOHfxL6eQMxV2FLiMqQY 8Ad36rZ+6UlDWs5G8lvLdw+8ZnegNSg7QV0Vjd0SrHFT4W/fV6/X7wEiMAD/MIKnjElH pxmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715645053; x=1716249853; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=izF5rtMCrzYW+6dSTB8zoeJ8j1Cn/UiMTq5solKkXpk=; b=FEstBcaVGfTpRGoUF0eLYi5bidoOyFngr+8tCwgBusfZPQPJ3SAHollKmpPvmfzo54 DDZkRq1xYQy9LUEdfa2CPDJ7mXhbQRqDqFcCzOk2VcO1E7F9sRCFI7huP4nvdhkWhK18 rdXLHTYRAjK36yeUkGF9PNf9TfhbZ0yZBz7hC4ak0xYmYGbZ1Q5bNRvfUxiEKXFN1n+T K+z4wZ+wZnIMpW7xJvDYbXUZcwzk4YlOdLJhSAJTia/ubOXbTUoXS7MLowo+lS1BqUPh uYPCvxKFW1sMoHfDJ9QoFGpnfAHXRmjBUSRZTcIWIamNJAEbfxORTqMcbWCI21hzkLRD NtAw== X-Gm-Message-State: AOJu0YxiF9vjVMOUWcYBGOipi5DM3rDc2sQHb5V6nyF8AO+XeJEn/Ilz /QU0dZTjKtPoIQ7EMVIGSr5xK9aaZaODSkGVwK4QhJJQay0xJLe87oBGoWAFNEtzj+586ROLDzF Ah9J56Oe165GYPTDgeSuZ18V1kUhGp4ywT8sm3g== X-Google-Smtp-Source: AGHT+IE64zQl2F5wbH3Loh/TL1wNezqQ4EneFUFWmv6+yw4y/GawlU5BpbA7kW9noaEuyOcs7FaNjTu/CIRrD95m6fE= X-Received: by 2002:a9d:3e5a:0:b0:6f0:ad78:1b75 with SMTP id 46e09a7af769-6f0e9171323mr13053219a34.22.1715645053019; Mon, 13 May 2024 17:04:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Advait Maybhate Date: Mon, 13 May 2024 20:04:02 -0400 Message-ID: Subject: Re: [BUG] ZLE character width with emoji presentation variation selectors in Unicode To: Bart Schaefer Cc: zsh-workers@zsh.org, Aloke Desai , Zach Bai Content-Type: multipart/alternative; boundary="000000000000f23ed606185ebd02" X-Seq: 52933 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --000000000000f23ed606185ebd02 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ah cool - didn't know about the glitch prompt. Thanks for the info! Hmm, though yep, I was observing that the width reservation seems to be working correctly in the prompt itself but seems to fail for the bracketed paste case (when testing in Kitty for correctness), thus the glitch prompt doesn't entirely help here unfortunately. On Fri, May 10, 2024 at 4:40=E2=80=AFPM Bart Schaefer wrote: > On Fri, May 10, 2024 at 10:12=E2=80=AFAM Advait Maybhate wrote: > > > > In fish's case, I believe they use ridiculousfish/widecharwidth which > does seem to handle emoji presentation selectors. unicode-width, part of > the Rust stdlib, recently added support for correctly reporting the width > of these sequences as well: unicode-width/pull/41. > > Note that if your primary concern is emojis in prompts (rather than in > text typed as command input), zsh has the %G (for "glitch") prompt > sequence. So if you write e.g. > > PS1=3D"Cloudy %{=E2=98=81=EF=B8=8F%2G%}% " > > then zsh will correctly reserve 2 positions for the glyph when > calculating the prompt. (Note gmail may have messed up the copy-paste > of the emoji; do it right and it works). > --000000000000f23ed606185ebd02 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ah cool - didn't know about the glitch prompt. Thanks = for the info!

Hmm, though yep, I was observing that the = width reservation seems to be working=C2=A0correctly in the prompt itself b= ut seems to fail for the bracketed paste case (when testing in Kitty for co= rrectness), thus the glitch prompt doesn't entirely help here unfortuna= tely.



--000000000000f23ed606185ebd02--