Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Read a line from user without clearing screen below the prompt while allowing user to use arrow keys to make edits in middle of line
- X-seq: zsh-workers 51270
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxx>
- Cc: OG Code Poet <ogcodepoet@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Read a line from user without clearing screen below the prompt while allowing user to use arrow keys to make edits in middle of line
- Date: Sat, 31 Dec 2022 16:10:30 -0800
- Archived-at: <https://zsh.org/workers/51270>
- In-reply-to: <87109-1672492415.579439@wMHr.mGJl.BpB2>
- List-id: <zsh-workers.zsh.org>
- References: <CADmFDtUiRpYTYh21-aeE_UuSAHqG=c2vcRT0oSND+i9ehu4SOA@mail.gmail.com> <CAH+w=7ZDaLHEP6qa6eV0oSWkJAhj-TbY+sZZM+rUBrkgGoBF-w@mail.gmail.com> <CADmFDtVoEiSsLi4DWC22+yW2LzbFUXpAnWL1_0MrmcPtgh6PYg@mail.gmail.com> <CAH+w=7adRQa1NJSw+73n6gVFO=x4YxjfwZ2E7brhoPVoomJyrw@mail.gmail.com> <87109-1672492415.579439@wMHr.mGJl.BpB2>
On Sat, Dec 31, 2022 at 5:14 AM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> The first idea that came into my mind was to try setopt singlelinezle
That was my first thought too, and I also tried setting LINES=1 along
with it, but no help.
> I think the clearing from
> the cursor to the end of the window serves a purpose in general.
In fact I think it's issuing both move-to-first-column as well as
clear-to-end. It wants to know exactly what positions the prompt
occupies and have free rein over the rest.
Seems like it should be possible to do something with a tweaked
read-from-minibuffer as the vared initial-widget, but I think vared is
going to end up clearing at least the entire last line of the screen
no matter what.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author