forgot this one
parent
4846798528
commit
97b971747f
|
@ -2338,8 +2338,17 @@ function Ace2Inner(){
|
||||||
editorInfo.ace_setAttributeOnSelection = setAttributeOnSelection;
|
editorInfo.ace_setAttributeOnSelection = setAttributeOnSelection;
|
||||||
|
|
||||||
|
|
||||||
function getAttributeOnSelection(attributeName){
|
function getAttributeOnSelection(attributeName, prevChar){
|
||||||
if (!(rep.selStart && rep.selEnd)) return
|
if (!(rep.selStart && rep.selEnd)) return
|
||||||
|
var isNotSelection = (rep.selStart[0] == rep.selEnd[0] && rep.selEnd[1] === rep.selStart[1]);
|
||||||
|
if(isNotSelection){
|
||||||
|
if(prevChar){
|
||||||
|
// If it's not the start of the line
|
||||||
|
if(rep.selStart[1] !== 0){
|
||||||
|
rep.selStart[1]--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var withIt = Changeset.makeAttribsString('+', [
|
var withIt = Changeset.makeAttribsString('+', [
|
||||||
[attributeName, 'true']
|
[attributeName, 'true']
|
||||||
|
|
Loading…
Reference in New Issue