diff options
author | John McLear <john@mclear.co.uk> | 2013-12-01 18:54:46 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2013-12-01 18:54:46 +0000 |
commit | 3791ad41860d5174c0fb890f613028a2007d2eab (patch) | |
tree | 51d656040e749bbfbc1bcc01321aa50bab54c867 /src/static/js | |
parent | b4877f002dfd905b4606c4bf9c390eca15591719 (diff) | |
download | etherpad-lite-3791ad41860d5174c0fb890f613028a2007d2eab.zip |
ends of line shouldn't show incorrect formatted status
Diffstat (limited to 'src/static/js')
-rw-r--r-- | src/static/js/ace2_inner.js | 12 |
1 files changed, 12 insertions, 0 deletions
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]; |