From 84bd682e2e1e32d2048c25253870a2756ad3e610 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 24 Dec 2014 16:12:21 -0800 Subject: [PATCH] Make it harder for automation script to leave no lines selected --- src/auto4_lua.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/auto4_lua.cpp b/src/auto4_lua.cpp index a39c32168..1b6a5f318 100644 --- a/src/auto4_lua.cpp +++ b/src/auto4_lua.cpp @@ -803,6 +803,8 @@ namespace { AssDialogue *new_active = c->selectionController->GetActiveLine(); if (active_line && (active_idx > 0 || !sel.count(new_active))) new_active = active_line; + if (sel.empty()) + sel.insert(new_active); c->selectionController->SetSelectionAndActive(std::move(sel), new_active); } else {