[Bug 6070] New: ui.prompt() prompt disappears on window resize
mercurial-bugs at mercurial-scm.org
mercurial-bugs at mercurial-scm.org
Mon Feb 4 19:36:41 UTC 2019
https://bz.mercurial-scm.org/show_bug.cgi?id=6070
Bug ID: 6070
Summary: ui.prompt() prompt disappears on window resize
Product: Mercurial
Version: unspecified
Hardware: PC
OS: Linux
Status: UNCONFIRMED
Severity: feature
Priority: wish
Component: Mercurial
Assignee: bugzilla at mercurial-scm.org
Reporter: hg at pewpew.net
CC: mercurial-devel at mercurial-scm.org
I can't really write a test for this, but it's easy enough to reproduce:
$ hg debuguiprompt -p 'are kittens cute?'
This will ask you whether kittens are cute. Despite knowing the obvious correct
answer, *don't* answer it, and instead resize your terminal.
On Linux, at least (no idea on windows), we use readline by default, which
replaces the prompt we wrote with the prompt we told readline about (which is a
single space: ' ').
Since almost all uses of `ui._prompt` are via `ui.promptchoice` (only one
non-debugcommand use of `ui.prompt` in `mercurial/*.py`), and I suspect it
doesn't make sense to use readline there, I'm going to send a change to stop
using readline for ui.promptchoice prompts. I'm tempted to remove it entirely,
but that feels like a bigger change.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list