Skip to content

Commit 6e40df2

Browse files
committed
Updated codemirror to support panel and match-highlighter and revert some unnecessary changes
1 parent 33cdec2 commit 6e40df2

8 files changed

Lines changed: 27 additions & 23 deletions

File tree

public/vendor/codemirror/addon/dialog/dialog.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@
2929

3030
.CodeMirror-dialog button {
3131
font-size: 70%;
32+
color: black;
3233
}

public/vendor/codemirror/addon/scroll/annotatescrollbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
var height = Math.max(bottom - top, 3);
9898

9999
var elt = frag.appendChild(document.createElement("div"));
100-
elt.style.cssText = "position: absolute; right: 0px; width: " + Math.max(cm.display.barWidth * 2, 2) + "px; top: "
100+
elt.style.cssText = "position: absolute; right: 0px; width: " + Math.max(cm.display.barWidth * 1.5, 2) + "px; top: "
101101
+ (top + this.buttonHeight) + "px; height: " + height + "px";
102102
elt.className = this.options.className;
103103
}

public/vendor/codemirror/addon/scroll/simplescrollbars.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
.CodeMirror-simplescroll-horizontal {
1717
bottom: 0; left: 0;
18-
height: 8px;
18+
height: 6px;
1919
}
2020
.CodeMirror-simplescroll-horizontal div {
2121
bottom: 0;
@@ -24,7 +24,7 @@
2424

2525
.CodeMirror-simplescroll-vertical {
2626
right: 0; top: 0;
27-
width: 8px;
27+
width: 6px;
2828
}
2929
.CodeMirror-simplescroll-vertical div {
3030
right: 0;
@@ -39,8 +39,8 @@
3939
.CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div {
4040
position: absolute;
4141
background: #ccc;
42-
border-radius: 3px;
43-
margin: 2px;
42+
border-radius: 7px;
43+
border: 2px solid #222;
4444
}
4545

4646
.CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical {
@@ -50,16 +50,16 @@
5050

5151
.CodeMirror-overlayscroll-horizontal {
5252
bottom: 0; left: 0;
53-
height: 6px;
53+
height: 10px;
5454
}
5555
.CodeMirror-overlayscroll-horizontal div {
5656
bottom: 0;
5757
height: 100%;
5858
}
5959

6060
.CodeMirror-overlayscroll-vertical {
61-
right: 0; top: 0;
62-
width: 6px;
61+
right: 0px; top: 0px;
62+
width: 10px;
6363
}
6464
.CodeMirror-overlayscroll-vertical div {
6565
right: 0;

public/vendor/codemirror/addon/scroll/simplescrollbars.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,14 @@
7575
this.screen = clientSize;
7676
this.total = scrollSize;
7777
this.size = barSize;
78+
7879
var buttonSize = this.screen * (this.size / this.total);
7980
if (buttonSize < minButtonSize) {
8081
this.size -= minButtonSize - buttonSize;
8182
buttonSize = minButtonSize;
8283
}
8384
this.inner.style[this.orientation == "horizontal" ? "width" : "height"] =
84-
(buttonSize - 4) + "px";
85+
buttonSize + "px";
8586
this.inner.style[this.orientation == "horizontal" ? "left" : "top"] =
8687
this.pos * (this.size / this.total) + "px";
8788
};

public/vendor/codemirror/addon/search/matchesonscrollbar.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.CodeMirror-search-match {
22
background: gold;
3-
border-top: 1px solid orange;
4-
border-bottom: 1px solid orange;
3+
border: 1px solid orange;
54
-moz-box-sizing: border-box;
65
box-sizing: border-box;
76
opacity: .5;

public/vendor/codemirror/codemirror.min.js

Lines changed: 12 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/vendor/codemirror/compress.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ addon/selection/active-line.js \
77
addon/search/searchcursor.js \
88
addon/search/search.js \
99
addon/search/matchesonscrollbar.js \
10+
addon/search/match-highlighter.js \
1011
addon/scroll/simplescrollbars.js \
1112
addon/scroll/annotatescrollbar.js \
13+
addon/display/panel.js \
1214
addon/dialog/dialog.js \
1315
addon/edit/matchbrackets.js \
1416
addon/edit/closebrackets.js \

public/vendor/codemirror/lib/codemirror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@
388388
viewWidth: d.wrapper.clientWidth,
389389
barLeft: cm.options.fixedGutter ? gutterW : 0,
390390
docHeight: docH,
391-
scrollHeight: docH + scrollGap(cm) + d.barHeight + textHeight(cm.display),
391+
scrollHeight: docH + scrollGap(cm) + d.barHeight,
392392
nativeBarWidth: d.nativeBarWidth,
393393
gutterWidth: gutterW
394394
};

0 commit comments

Comments
 (0)