From 3791ad41860d5174c0fb890f613028a2007d2eab Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 1 Dec 2013 18:54:46 +0000 Subject: [PATCH] ends of line shouldn't show incorrect formatted status --- src/static/js/ace2_inner.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 3749a858..736fba5a 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -498,6 +498,15 @@ function Ace2Inner(){ finally { var cs = currentCallStack; + + hooks.callAll('acePostEditEvent', { + callstack: cs, + editorInfo: editorInfo, + rep: rep, + documentAttributeManager: documentAttributeManager + }); + + //console.log("Finished action for: "+type); if (cleanExit) { @@ -2396,6 +2405,9 @@ function Ace2Inner(){ if(rep.lines.atIndex(n).text.length == 0){ return false; // If the line length is 0 we basically treat it as having no formatting } + if(rep.selStart[1] == rep.selEnd[1] && rep.selStart[1] == rep.lines.atIndex(n).text.length){ + return false; // If we're at the end of a line we treat it as having no formatting + } if (n == selStartLine) { selectionStartInLine = rep.selStart[1];