Three examples to illustrate the problem. In all cases,
start in edit mode in a code cell, say cell N.
A.
In edit mode in cell N, do the following steps at a high pace
without waiting between each step for things to complete:
type or paste some code
hit Shift-Enter to run it
hit Enter to enter edit mode in the next cell
Expected: things happen in order, regardless of lag:
the typed or pasted code appears in cell N
cell N gets run and focus moves to cell N+1
we enter edit mode in cell N+1
Observed:
the typed or pasted code appears in cell N (good)
cell N+1 becomes blue, indicating it has focus
and we are in command mode (good)
cell N starts to run (good)
somehow the cursor is still in cell N (strange)
a newline appears at the end of cell N (bad)
we do not enter edit mode in cell N+1 (bad)
we end up in command mode at cell N+1 (bad)
User's next step: up-arrow to go back to cell N, hit Enter
to enter edit mode, delete unwanted newline, hit Esc to enter
command mode, wait, down-arrow to go to cell N+1, hit Enter
to enter edit mode.
B.
Similarly, if after Shift-Enter, instead of hitting Enter,
one hits M to make cell N+1 a markdown cell, or A to add
a new cell between cells N and N+1, instead of the expected
command-mode action happening (make cell markdown,
resp. new cell above), these often result in the character "m",
resp. "a", being appended to cell N.
User's next step: go back to cell N to remove extra M or A,
then back to cell N+1.
C.
Similarly, starting in edit mode in a code cell,
type (without waiting a lot between each keystroke)
the sequence of keys Esc, m, Enter.
Expected:
enter command mode
cell becomes markdown
enter edit mode again in the markdown cell
Observed:
partly enter command mode,
but with cursor still in cell N somehow
character "m" and a newline appear in code cell
end up in command mode, with cell still a code cell
User's next step: wait for CoCalc to be ready,
hit Enter again to enter edit mode, remove
unwanted newline and character "m", hit Esc,
wait, hit M, wait, hit Enter. Get to desired state.
Three examples to illustrate the problem. In all cases, start in edit mode in a code cell, say cell N.
A.
In edit mode in cell N, do the following steps at a high pace without waiting between each step for things to complete:
Expected: things happen in order, regardless of lag:
Observed:
User's next step: up-arrow to go back to cell N, hit Enter to enter edit mode, delete unwanted newline, hit Esc to enter command mode, wait, down-arrow to go to cell N+1, hit Enter to enter edit mode.
B.
Similarly, if after Shift-Enter, instead of hitting Enter, one hits M to make cell N+1 a markdown cell, or A to add a new cell between cells N and N+1, instead of the expected command-mode action happening (make cell markdown, resp. new cell above), these often result in the character "m", resp. "a", being appended to cell N.
User's next step: go back to cell N to remove extra M or A, then back to cell N+1.
C.
Similarly, starting in edit mode in a code cell, type (without waiting a lot between each keystroke) the sequence of keys Esc, m, Enter.
Expected:
Observed:
User's next step: wait for CoCalc to be ready, hit Enter again to enter edit mode, remove unwanted newline and character "m", hit Esc, wait, hit M, wait, hit Enter. Get to desired state.