outdent-ol-on-click
John McLear 2020-06-06 21:56:23 +00:00
parent d13f968752
commit 91966533df
1 changed files with 7 additions and 1 deletions

View File

@ -5168,11 +5168,13 @@ function Ace2Inner(){
var listType = /([a-z]+)([0-9]+)/.exec(getLineListType(n)); var listType = /([a-z]+)([0-9]+)/.exec(getLineListType(n));
// Used to outdent if ol is removed // Used to outdent if ol is removed
/*
if(allLinesAreList){ if(allLinesAreList){
var togglingOn = false; var togglingOn = false;
}else{ }else{
var togglingOn = true; var togglingOn = true;
} }
*/
if (listType) if (listType)
{ {
@ -5183,6 +5185,10 @@ function Ace2Inner(){
if(t === listType) togglingOn = false; if(t === listType) togglingOn = false;
if (allLinesAreList && level != 1) { level = level - 1; }
else if (t && !allLinesAreList) { level = level + 1; }
/*
if(togglingOn){ if(togglingOn){
mods.push([n, allLinesAreList ? 'indent' + level : (t ? type + level : type + '1')]); mods.push([n, allLinesAreList ? 'indent' + level : (t ? type + level : type + '1')]);
}else{ }else{
@ -5197,7 +5203,7 @@ function Ace2Inner(){
setLineListType(n, "indent"+level); // outdent setLineListType(n, "indent"+level); // outdent
} }
} }
*/
} }
_.each(mods, function(mod){ _.each(mods, function(mod){