From 6b11ae330d735b2af767f8951a78167f373b15fe Mon Sep 17 00:00:00 2001 From: Jean-Tiare Le Bigot Date: Fri, 25 Nov 2011 09:13:03 +0100 Subject: [PATCH] added handling of de-indenting when already on higher level --- static/js/ace2_inner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/ace2_inner.js b/static/js/ace2_inner.js index 9c647b6df..e606f88dd 100644 --- a/static/js/ace2_inner.js +++ b/static/js/ace2_inner.js @@ -3560,10 +3560,10 @@ function OUTER(gscope) foundLists = true; var t = listType[1]; var level = Number(listType[2]); - var newLevel = Math.max(1, Math.min(MAX_LIST_LEVEL, level + (isOut ? -1 : 1))); + var newLevel = Math.max(0, Math.min(MAX_LIST_LEVEL, level + (isOut ? -1 : 1))); if (level != newLevel) { - mods.push([n, t + newLevel]); + mods.push([n, (newLevel > 0) ? t + newLevel : '']); } } }