don't lowercase the original line!

This commit is contained in:
tophf 2017-11-23 19:32:52 +03:00
parent 7c746ab9a3
commit 60247a6443

View File

@ -435,7 +435,7 @@
openPopup(color) { openPopup(color) {
let {line, ch} = this.cm.getCursor(); let {line, ch} = this.cm.getCursor();
const lineText = this.cm.getLine(line).toLowerCase(); const lineText = this.cm.getLine(line);
const lineTextLC = lineText.toLowerCase(); const lineTextLC = lineText.toLowerCase();
const atImportant = lineTextLC.lastIndexOf('!important', ch); const atImportant = lineTextLC.lastIndexOf('!important', ch);
ch -= (atImportant >= Math.max(0, ch - '!important'.length)) ? '!important'.length : 0; ch -= (atImportant >= Math.max(0, ch - '!important'.length)) ? '!important'.length : 0;