Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

Fix broken repl output #27

Open
ghalestrilo opened this issue Dec 26, 2020 · 0 comments
Open

Fix broken repl output #27

ghalestrilo opened this issue Dec 26, 2020 · 0 comments

Comments

@ghalestrilo
Copy link
Owner

Right now the :repl messages are stored inside the state as an array of strings. the problem is: usually the process output doesn't come buffered onto lines, so when rendered, the text comes off broken. Also, sliding is very rudimentary - a better buffer leads to better sliding.

Options

  1. Investigate node's child_process lib, maybe there is a setting for buffering newlines
  2. buffer them manually
  • Store repl output as a string
  • append to this string every evaluation / output (instead of pushing a new string to the array)
  • split on \n
  • limit to n lines
  • join them back together with \n
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant