From f30176ccb18c3893865d5304e71cb2b078727d40 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 26 Jul 2022 16:27:04 +0200 Subject: [PATCH] Fix next/prev flag fallback --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 6a1147f..e6c8cf4 100644 --- a/init.lua +++ b/init.lua @@ -80,14 +80,14 @@ for f=1, #flag_list do prev_flag[name1] = name0 end local get_next_flag = function(current_flag_name) - if not current_flag_name then + if not current_flag_name or not next_flag[ current_flag_name ] then return DEFAULT_FLAG else return next_flag[current_flag_name] end end local get_prev_flag = function(current_flag_name) - if not current_flag_name then + if not current_flag_name or not prev_flag[ current_flag_name ] then return DEFAULT_FLAG else return prev_flag[current_flag_name]