@rlabs-inc/tui 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/api/history.ts +4 -0
package/package.json
CHANGED
package/src/api/history.ts
CHANGED
|
@@ -405,6 +405,10 @@ export function createRenderToHistory(
|
|
|
405
405
|
// Without batch, the ReactiveSet triggers updates when we allocate/release indices,
|
|
406
406
|
// causing the render effect to run mid-operation and duplicate content.
|
|
407
407
|
batch(() => {
|
|
408
|
+
// STEP 1: Erase the active area BEFORE doing anything else
|
|
409
|
+
// This clears the screen so history can be written where the active area was
|
|
410
|
+
appendRegionRenderer.eraseActive()
|
|
411
|
+
|
|
408
412
|
// Save current allocated indices BEFORE creating history components
|
|
409
413
|
const beforeIndices = new Set(getAllocatedIndices())
|
|
410
414
|
|