[fix] Have one setting for each shortcut to create ordered list

This is an adjustment to #2891.
This commit is contained in:
Luiza Pagliari 2017-05-11 14:56:09 -03:00
parent 97038c2183
commit 0cb8d31e95
4 changed files with 96 additions and 8 deletions

View file

@ -122,6 +122,7 @@ exports.padShortcutEnabled = {
"cmd5" : true,
"cmdShiftL" : true,
"cmdShiftN" : true,
"cmdShift1" : true,
"cmdShiftC" : true,
"cmdH" : true,
"ctrlHome" : true,

View file

@ -3939,9 +3939,9 @@ function Ace2Inner(){
doInsertUnorderedList()
specialHandled = true;
}
if ((!specialHandled) && isTypeForCmdKey && (String.fromCharCode(which).toLowerCase() == "n" || String.fromCharCode(which) == 1) && (evt.metaKey || evt.ctrlKey) && evt.shiftKey && padShortcutEnabled.cmdShiftN)
if ((!specialHandled) && isTypeForCmdKey && ((String.fromCharCode(which).toLowerCase() == "n" && padShortcutEnabled.cmdShiftN) || (String.fromCharCode(which) == 1 && padShortcutEnabled.cmdShift1)) && (evt.metaKey || evt.ctrlKey) && evt.shiftKey)
{
// cmd-shift-N (orderedlist)
// cmd-shift-N and cmd-shift-1 (orderedlist)
fastIncorp(9);
evt.preventDefault();
doInsertOrderedList()