From f71bfb43c43e07d7b7fa1bfb8b13f4d0fc2510b7 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 13 Apr 2018 23:14:06 +0200 Subject: [PATCH] Fix ranges in select command --- cmds.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds.cc b/cmds.cc index 73daa4c..9ce9e03 100644 --- a/cmds.cc +++ b/cmds.cc @@ -575,7 +575,7 @@ vector select_cmd::process(vector &pages) int f = validate_page_index(pages, ps.from); int t = validate_page_index(pages, ps.to); int step = (f <= t) ? 1 : -1; - for (int i=f; f<=t; f += step) + for (int i=f; i<=t; i += step) selected.push_back(pages[i]); } auto processed = run_command_list(pb->commands, selected); -- 2.39.2