From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4691 invoked by alias); 13 Aug 2018 21:45:44 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43289 Received: (qmail 11441 invoked by uid 1010); 13 Aug 2018 21:45:44 -0000 X-Qmail-Scanner-Diagnostics: from mail-lj1-f178.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.208.178):SA:0(-1.9/5.0):. Processed in 1.248663 secs); 13 Aug 2018 21:45:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIMWL_WL_MED,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6KiJDEjBzbDtZkEJ3jtZDNN+0YdTI1YUDFQeHi/9mA4=; b=SoZUD3U0Z6gtlQl3/i+0ud+qqEuBew11jqPitNNt8FnkuTQvh4dAkG4VOsXkVsgwxq NEtmOVG+jA1d5FsgSIfmvBOBftY29TqBPYD3LSTWHV7OW+6YQiXqXevFoKN4/HOa1ftW /Vzaw9yTJrNn1c9qbuDnqADxDNay7AVABKPHg7joJ6Fy08q2JceRqpc0nUTXP8bn7mIq czfgYTzXdu6Qtk8+7ZD5Zi8DuIGzUmGe+dERqjA5f7xdltYnDcRnE1/pHn2Xe5IUEnRJ Lsn0ITGntQvWI6Tms6s7AVeKwLc4UhOOkk2pWeXuHBfcwQnnAzFtzipPY15DnqYH4jfW TIPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6KiJDEjBzbDtZkEJ3jtZDNN+0YdTI1YUDFQeHi/9mA4=; b=ViiLqyHObuhZX6nMGAAowjIRNlrsroAVEUxRlL4opEPpuDo3jKg4OV9RJiTJfgHtyQ WwsBT/5/MImPOtHHk1rz8Ij1/36A/fCRpGtqkUojkrO0dRTKtXAuFwR1FXPZWoH7PLDH FmouYbejcRagiKTUWjCqEPyuRxxOx2cdww7o/DemSAvtFyXv7bbao3FGtRu+fXfPi8C/ 78pZeTMheAZZRlyInRUU9F/GI1rOpbjMEXuaFo87U6RhrrIxfQBnvWj8vqqbFBbz4a/P HurXwYqqq/ZppNiXhgqcMBQd1w/hHw83EfbxyxCoXx1qmAPdoItdAHmy1264+Yn9+lV0 NvGQ== X-Gm-Message-State: AOUpUlEtDdg8z/8eeVdVbtgF2ely4bVXhe5V0UgdcZ2/fY+n7CsyPML5 hvcFN0oqpMwZXwlnkVS+RMVUPK/dPye6+KxM37ZDiFLZc7I= X-Google-Smtp-Source: AA+uWPwRpoQYCuivC3Srl9lKYhPkHaOpH4w6qn8EknZeXtnhn8JfJrQqEcUzjVGdk6lBKh8WfUj+j8m8CYS4xlZF4ZM= X-Received: by 2002:a2e:21d5:: with SMTP id h82-v6mr13109608lji.46.1534196738582; Mon, 13 Aug 2018 14:45:38 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <383CC796-865C-4774-A9C2-AD44997784B4@dana.is> References: <20180813084255eucas1p102bc21872ad72a2cd049d8d9db2f0e86~KZResIryo0309103091eucas1p10@eucas1p1.samsung.com> <20180813113640eucas1p19d52c9c05089626f375a00c5115aef32~KbpML4Mzp0510505105eucas1p1P@eucas1p1.samsung.com> <20180813125810eucas1p181a58cb55dc815863d6d81e1cd629d71~KcwV9B7ZD1627716277eucas1p1o@eucas1p1.samsung.com> <3F00E10A-6A65-4201-A4E2-2A29929111C1@dana.is> <383CC796-865C-4774-A9C2-AD44997784B4@dana.is> From: Bart Schaefer Date: Mon, 13 Aug 2018 14:45:37 -0700 Message-ID: Subject: Re: "off by one fix in multiple prompts" breaks multiline prompt To: dana Cc: Peter Stephenson , Guillaume Chazarain , "zsh-workers@zsh.org" , Warepire - Content-Type: text/plain; charset="UTF-8" On Mon, Aug 13, 2018 at 2:29 PM, dana wrote: > > I think that was in fact the problem. So if we revert the previous change, and > then add an additional check for a last-column new-line, we end up with > something like the attached. This seems to fix both the original issue and the > new one for me, but obviously further testing would be nice There are terminals that immediately scroll upon a newline being written after the last column, especially if it is the last column of the last line (which is where the prompt most often is). So sometimes a double-increment may be necessary, and its hard to tell when. This is why for years we tried to limit everything to 1 column less than the exact width. Presumably ZLE_RPROMPT_INDENT=0 helps in that case?