Merge pull request #2887 from bhldev/editorListIndentOutdent

Editor List Fix for 2844 and 2812
pull/2890/head
John McLear 2016-01-19 23:48:20 +00:00
commit 13d9bdf03a
1 changed files with 6 additions and 0 deletions

View File

@ -5365,6 +5365,12 @@ function Ace2Inner(){
level = Number(listType[2]);
}
var t = getLineListType(n);
// if already a list, deindent
if (allLinesAreList && level != 1) { level = level - 1; }
// if already indented, then add a level of indentation to the list
else if (t && !allLinesAreList) { level = level + 1; }
mods.push([n, allLinesAreList ? 'indent' + level : (t ? type + level : type + '1')]);
}