From 51d58f2cceb27648b59f420e9d3076d42861515b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 24 Jan 2012 01:54:31 +0900 Subject: [PATCH] hold down option to not increment cloze --- aqt/editor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aqt/editor.py b/aqt/editor.py index 776a2c0b9..2dd33f49e 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -586,6 +586,8 @@ class Editor(object): m = re.findall("\{\{c(\d+)::", f) if m: next = sorted([int(x) for x in m])[-1] + 1 + if self.mw.app.keyboardModifiers() & Qt.AltModifier: + next -= 1 else: next = 1 self.web.eval("wrap('{{c%d::', '}}');" % next)