|
|
|
@ -183,7 +183,7 @@ export function CommandLine({proofPanelRef}: {proofPanelRef: React.MutableRefObj
|
|
|
|
proofPanelRef.current?.lastElementChild?.scrollIntoView()
|
|
|
|
proofPanelRef.current?.lastElementChild?.scrollIntoView()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}, [commandLineInput, editor, rpcSess, uri, model, proofPanelRef])
|
|
|
|
}, [editor, rpcSess, uri, model, proofPanelRef])
|
|
|
|
|
|
|
|
|
|
|
|
// Run the command
|
|
|
|
// Run the command
|
|
|
|
const runCommand = React.useCallback(() => {
|
|
|
|
const runCommand = React.useCallback(() => {
|
|
|
|
@ -200,7 +200,7 @@ export function CommandLine({proofPanelRef}: {proofPanelRef: React.MutableRefObj
|
|
|
|
pos,
|
|
|
|
pos,
|
|
|
|
editor.getModel().getFullModelRange().getEndPosition()
|
|
|
|
editor.getModel().getFullModelRange().getEndPosition()
|
|
|
|
),
|
|
|
|
),
|
|
|
|
text: commandLineInput + "\n",
|
|
|
|
text: commandLineInput.trim() + "\n",
|
|
|
|
forceMoveMarkers: false
|
|
|
|
forceMoveMarkers: false
|
|
|
|
}])
|
|
|
|
}])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -277,7 +277,7 @@ export function CommandLine({proofPanelRef}: {proofPanelRef: React.MutableRefObj
|
|
|
|
// Ensure that our one-line editor can only have a single line
|
|
|
|
// Ensure that our one-line editor can only have a single line
|
|
|
|
const l = oneLineEditor.getModel().onDidChangeContent((e) => {
|
|
|
|
const l = oneLineEditor.getModel().onDidChangeContent((e) => {
|
|
|
|
const value = oneLineEditor.getValue()
|
|
|
|
const value = oneLineEditor.getValue()
|
|
|
|
setCommandLineInput(value.trim())
|
|
|
|
setCommandLineInput(value)
|
|
|
|
const newValue = value.replace(/[\n\r]/g, '')
|
|
|
|
const newValue = value.replace(/[\n\r]/g, '')
|
|
|
|
if (value != newValue) {
|
|
|
|
if (value != newValue) {
|
|
|
|
oneLineEditor.setValue(newValue)
|
|
|
|
oneLineEditor.setValue(newValue)
|
|
|
|
|