From 1c8b91ed8625dd4b851d8d61fd030d6749fdbcf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Blizi=C5=84ski?= Date: Fri, 8 Sep 2023 19:38:55 +0100 Subject: [PATCH] Keep the search term in the dialog box. When user wants to keep the dialog box open, it's probably with the intention to edit the search term rather than typing it from scratch again. --- share/scripts/jump_to_marker.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/scripts/jump_to_marker.lua b/share/scripts/jump_to_marker.lua index 811b3dedef..7c82cf0e82 100644 --- a/share/scripts/jump_to_marker.lua +++ b/share/scripts/jump_to_marker.lua @@ -6,12 +6,13 @@ ardour { ["type"] = "EditorAction", name = "Search and Jump to Marker", function factory () return function () local keep = false + local search_term = '' ::restart:: local dlg = LuaDialog.Dialog ("Search and Jump to Marker", { - { type = "entry", key = "marker", default = '', title = "Marker Prefix" }, + { type = "entry", key = "marker", default = search_term, title = "Marker Prefix" }, { type = "checkbox", key = "keep", default = keep, title = "Keep Dialog Open" }, }) @@ -23,6 +24,8 @@ function factory () return function () if (rv['marker'] == "") then if keep then goto restart end return + else + search_term = rv['marker'] end for l in Session:locations():list():iter() do