[Bug 10381] New: (patch inside) lineedit: multiline PS1: fix extra scrolls

bugzilla at busybox.net bugzilla at busybox.net
Sat Oct 7 19:21:11 UTC 2017


            Bug ID: 10381
           Summary: (patch inside) lineedit: multiline PS1: fix extra
           Product: Busybox
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned at busybox.net
          Reporter: avihpit at yahoo.com
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

Created attachment 7266
  --> https://bugs.busybox.net/attachment.cgi?id=7266&action=edit
lineedit: multiline PS1: fix extra scrolls - redraw using  last PS1 line

The commit message:

lineedit: multiline PS1: fix extra scrolls - redraw using last PS1 line

This patch only affects prompts with newlines.

We redraw the prompt [+ input] occasionally, e.g. during tab completion,
history browsing or search, etc, and we expect it to align with prior
redraws, such that the visible effect is that only the input changes.

With multi-line PS1, redraw always printed the prompt some lines below
the old one, which resulted in terminal scroll during every redraw.

Now we only redraw the last PS1 line, so vertical alignment is easier to
manage (we already calculated it using only the last line, but re-drew
all lines - that was the culprit), which fixes those extra scrolls.

- Clear-screen (^L) is now the only case where we redraw all prompt lines.

- During terminal resize we now only redraw the last[/sole] prompt line,
  which is arguably better because it's hard to do right (and we never did).

- Good side effect for reverse-i-search: its prompt now replaces only the
  last line of the original prompt - like other shells do.

Note, when applied to busybox git master, the patch has a conflict at the
context of the last hunk because it's applied on top of the patch at bug 10376
. However, the patches and fixes are independent and just happen to modify near

You are receiving this mail because:
You are on the CC list for the bug.

More information about the busybox-cvs mailing list