--- a/src/Tools/VSCode/src/dynamic_output.scala Wed May 15 17:04:22 2024 +0200
+++ b/src/Tools/VSCode/src/dynamic_output.scala Thu May 16 11:59:06 2024 +0200
@@ -96,6 +96,10 @@
private val margin_ = Synchronized(None: Option[Double])
def margin: Double = margin_.value.getOrElse(server.resources.message_margin)
+ private val delay_margin = Delay.last(server.resources.output_delay, server.channel.Error_Logger) {
+ handle_update(None, force = true)
+ }
+
private def handle_update(restriction: Option[Set[Command]], force: Boolean = false): Unit = {
val html_output = server.resources.html_output
state.change(
@@ -127,6 +131,6 @@
def set_margin(margin: Double): Unit = {
margin_.change(_ => Some(margin))
- handle_update(None, force = true)
+ delay_margin.invoke()
}
}
--- a/src/Tools/VSCode/src/vscode_resources.scala Wed May 15 17:04:22 2024 +0200
+++ b/src/Tools/VSCode/src/vscode_resources.scala Thu May 16 11:59:06 2024 +0200
@@ -84,6 +84,7 @@
def html_output: Boolean = options.bool("vscode_html_output")
def tooltip_margin: Int = options.int("vscode_tooltip_margin")
def message_margin: Int = options.int("vscode_message_margin")
+ def output_delay: Time = options.seconds("vscode_output_delay")
/* document node name */