@eisenbud mentioned that it would be great if F11 didn't duplicate the text entered in an interactive window.
Note that if the cursor is at the end of the partial text, then it's fine:
i74 : 2+2█ <F11>
o74 = 4
However, if the cursor is earlier on the line (not necessarily the beginning), the line is duplicated:
i74 : █2+2 <F11>
result:
i79 : 2+22+2
o79 = 26
Perhaps check if the cursor is on the last line of the buffer, and in that case don't duplicate? Or perhaps duplicate only if there's a newline at the end of the line?
Using Return instead of F11, we don't see this behavior. Would it make sense to just bind F11 to M2-send-input (the same as Return) in M2-comint-mode and make M2-send-to-programM2-mode-only?
@eisenbud mentioned that it would be great if F11 didn't duplicate the text entered in an interactive window.
Note that if the cursor is at the end of the partial text, then it's fine:
However, if the cursor is earlier on the line (not necessarily the beginning), the line is duplicated:
result:
Perhaps check if the cursor is on the last line of the buffer, and in that case don't duplicate? Or perhaps duplicate only if there's a newline at the end of the line?