When executing Python code with highlighting turned on, many extra frames are created. It should be possible to keep track of lines highlighted in a different way and avoid creating extra frames when
code highlighting is used.
If this is done, the use of MAX_STEPS may have to be reviewed.
This might be done by recording line highlights in a separate array, one that would include the frame number and the lines to be highlighted. Using doc.eachLine from https://codemirror.net/doc/manual.html, one could remove any existing marks and just add those required by the frame being displayed.
When executing Python code with highlighting turned on, many extra frames are created. It should be possible to keep track of lines highlighted in a different way and avoid creating extra frames when code highlighting is used.
If this is done, the use of MAX_STEPS may have to be reviewed.
This might be done by recording line highlights in a separate array, one that would include the frame number and the lines to be highlighted. Using doc.eachLine from https://codemirror.net/doc/manual.html, one could remove any existing marks and just add those required by the frame being displayed.