termpixels icon indicating copy to clipboard operation
termpixels copied to clipboard

REPL

Open loganzartman opened this issue 4 years ago • 0 comments

Given more backend support like cursor save/restore and relative cursor motion, we could create a rich REPL utility for the non-alternate screen. Some ideas:

  • REPL helper which can print() a prompt, an input line, and extra text below
  • a LineBuffer, which is an auto-resizing Nx1 buffer
    • implements blit_to() to support copying (with wrapping) to another Buffer
    • implements render to backend without cursor movement, allowing automatic wrapping
  • REPL accepts LineBuffer for prompt and input line (maybe these are both a single LineBuffer) and an "extra" or "hint" buffer
  • hint buffer can be displayed below the input line, either transiently or permanently (creating more space before the next prompt/input line rather than being erased)
  • rendering of hint buffer would require using relative cursor motion--can we extend this to all buffer rendering or do we need a separate renderer for REPL?

loganzartman avatar Oct 11 '19 05:10 loganzartman