diff --git a/lib/js/src/State/State__Response.bs.js b/lib/js/src/State/State__Response.bs.js index 24cf8606..6d7399f5 100644 --- a/lib/js/src/State/State__Response.bs.js +++ b/lib/js/src/State/State__Response.bs.js @@ -20,10 +20,6 @@ function indent(content, indent$1) { return content.replace(/\n/g, "\n" + indentation); } -function removeNewlines(string) { - return string.split("\n").join("\n"); -} - async function handle(state, x) { switch (x.TAG) { case "Generic" : @@ -341,23 +337,22 @@ async function handle$1(state, dispatchCommand, response) { return await handle(state, response._0); case "RunningInfo" : var verbosity = response._0; - if (verbosity !== 1) { - var message = removeNewlines(response._1); - state.runningInfoLog.push([ - verbosity, - message - ]); - return await State__View$AgdaModeVscode.DebugBuffer.displayInAppendMode([[ - verbosity, - message - ]]); + if (verbosity === 1) { + return await State__View$AgdaModeVscode.Panel.displayInAppendMode(state, { + TAG: "Plain", + _0: "Type-checking", + [Symbol.for("name")]: "Plain" + }, [Item$AgdaModeVscode.plainText(response._1)]); } - var message$1 = removeNewlines(response._1); - return await State__View$AgdaModeVscode.Panel.displayInAppendMode(state, { - TAG: "Plain", - _0: "Type-checking", - [Symbol.for("name")]: "Plain" - }, [Item$AgdaModeVscode.plainText(message$1)]); + var message = response._1; + state.runningInfoLog.push([ + verbosity, + message + ]); + return await State__View$AgdaModeVscode.DebugBuffer.displayInAppendMode([[ + verbosity, + message + ]]); } } @@ -367,7 +362,6 @@ async function handle$1(state, dispatchCommand, response) { } exports.indent = indent; -exports.removeNewlines = removeNewlines; exports.DisplayInfo = DisplayInfo; exports.handle = handle$1; /* vscode Not a pure module */ diff --git a/src/State/State__Response.res b/src/State/State__Response.res index 560df88c..bd099490 100644 --- a/src/State/State__Response.res +++ b/src/State/State__Response.res @@ -5,8 +5,6 @@ let indent = (content, indent) => { let indentation = String.repeat(" ", indent) content->String.replaceRegExp(%re("/\n/g"), "\n" ++ indentation) // should also handles CR LF on Windows } -// does this function really do anything? -let removeNewlines = string => string->String.split("\n")->Array.join("\n") open Response module DisplayInfo = { @@ -207,14 +205,12 @@ let rec handle = async ( } | DisplayInfo(info) => await DisplayInfo.handle(state, info) | RunningInfo(1, message) => - let message = removeNewlines(message) await State.View.Panel.displayInAppendMode( state, Plain("Type-checking"), [Item.plainText(message)], ) | RunningInfo(verbosity, message) => - let message = removeNewlines(message) state.runningInfoLog->Array.push((verbosity, message))->ignore await State.View.DebugBuffer.displayInAppendMode([(verbosity, message)]) | CompleteHighlightingAndMakePromptReappear =>