BBS:      TELESC.NET.BR
Assunto:  src/syncterm/scripts/console.wren
De:       Deuc¨
Data:     Mon, 27 Apr 2026 16:09:27 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/03b52204073d523cedd367c7
Modified Files:
	src/syncterm/scripts/console.wren
Log Message:
SyncTERM: Wren console editing  cursor + scrollback + line edits

Three layered REPL improvements that had stacked up uncommitted in
console.wren:

* Line editing.  `cursor` byte-index now tracked alongside `input`.
  Left/Right move it (clamped), Home/End jump to ends, Delete
  removes the char at the cursor, Backspace removes the char before
  it, printable insert (and clipboard paste) splice at the cursor,
  Ctrl+W kills the word ending at the cursor (tail past it stays
  put), and history Up/Down snap the cursor to the end of the
  recalled line.  drawPrompt_ re-positions the conio cursor to
  prefix.count + cursor + 1 after painting so Left/Right/Home/End
  are visible.

* Scrollback.  PgUp/PgDn move by a viewport, Up/Down by a single
  display row.  scrollTop == -1 is "live tail"; any other value
  pins the row at the top of the viewport.  renderAllRows_ flattens
  the log into a list of display rows using the same chain-on-same-
  row rule as emitEntry_; paintViewport_ does the full repaint and
  scrollViewportUp1_/Down1_ do incremental single-row scrolls via
  Screen.moveRect.  Submitting or typing a printable rejoins live
  mode; Ctrl+L clears scroll state too.

* Window bounds.  Force Screen.window.bounds to the full screen
  for the console's lifetime  a BBS may have set a DEC scrolling
  region; the console expects the whole screen.  Original bounds
  are restored on exit alongside the saved screen.

Plus the /? help is regrouped into editing / history / scroll /
exit so the new keys are discoverable, and the SPDX header was
stripped (per the project's per-tree license policy).

Co-Authored-By: Claude Opus 4.7 (1M context) 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]