summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2013-12-17 20:48:19 +0000
committerJohn McLear <john@mclear.co.uk>2013-12-17 20:48:19 +0000
commit8313083cd9813614241d72036a49eddfb2ddfb3f (patch)
tree8c71a312ebe2f01f4149774e2bc4479d599cc76e /src
parent7c4479d5aa2ff7fa860cbe0f92f8dacbbe48781d (diff)
downloadetherpad-lite-8313083cd9813614241d72036a49eddfb2ddfb3f.zip
better handling for attribute queries
Diffstat (limited to 'src')
-rw-r--r--src/static/js/ace2_inner.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js
index 0aa9998a..b68b020c 100644
--- a/src/static/js/ace2_inner.js
+++ b/src/static/js/ace2_inner.js
@@ -2334,7 +2334,10 @@ function Ace2Inner(){
return false; // If we're at the end of a line we treat it as having no formatting
}
if(rep.selStart[1] == 0 && rep.selEnd[1] == 0){
- return false; // If we're at the start of a line attributes get confused..
+ rep.selEnd[1] == 1;
+ }
+ if(rep.selEnd[1] == -1){
+ rep.selEnd[1] = 1; // sometimes rep.selEnd is -1, not sure why.. When it is we should look at the first char
}
if (n == selStartLine)
{