Skip to content

Commit

Permalink
bring back trailing space to display selection going to the end of a …
Browse files Browse the repository at this point in the history
…line
  • Loading branch information
marijnh committed Feb 21, 2011
1 parent 1636384 commit 24ac851
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/codemirror.css
Expand Up @@ -45,5 +45,5 @@ span.CodeMirror-selected {
}


.CodeMirror-matchingbracket {color: #0f0;}
.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-matchingbracket {color: #0f0 !important;}
.CodeMirror-nonmatchingbracket {color: #f22 !important;}
3 changes: 2 additions & 1 deletion lib/codemirror.js
Expand Up @@ -271,7 +271,7 @@ var CodeMirror = (function() {
if (sfrom == sto) sfrom = null;

if (!allText)
span(" ");
span(" ", sfrom != null && sto == null ? "CodeMirror-selected" : null);
else if (!marked && sfrom == null)
for (var i = 0, e = st.length; i < e; i+=2) span(st[i], st[i+1]);
else {
Expand Down Expand Up @@ -315,6 +315,7 @@ var CodeMirror = (function() {
}
copyUntil(upto, extraStyle);
}
if (sfrom != null && sto == null) span(" ", "CodeMirror-selected");
}
if (includePre) html.push("</pre>");
return html.join("");
Expand Down

0 comments on commit 24ac851

Please sign in to comment.