fix #1827 setScrollMargin Breaks Multiple Selection When Margin is Greater Than 0
This commit is contained in:
parent
306e918920
commit
07c7c86944
2 changed files with 3 additions and 3 deletions
|
|
@ -190,7 +190,7 @@ var Cursor = function(parentEl) {
|
||||||
for (var i = 0, n = selections.length; i < n; i++) {
|
for (var i = 0, n = selections.length; i < n; i++) {
|
||||||
var pixelPos = this.getPixelPosition(selections[i].cursor, true);
|
var pixelPos = this.getPixelPosition(selections[i].cursor, true);
|
||||||
if ((pixelPos.top > config.height + config.offset ||
|
if ((pixelPos.top > config.height + config.offset ||
|
||||||
pixelPos.top < -config.offset) && i > 1) {
|
pixelPos.top < 0) && i > 1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -720,7 +720,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
sm.v = sm.top + sm.bottom;
|
sm.v = sm.top + sm.bottom;
|
||||||
sm.h = sm.left + sm.right;
|
sm.h = sm.left + sm.right;
|
||||||
if (sm.top && this.scrollTop <= 0 && this.session)
|
if (sm.top && this.scrollTop <= 0 && this.session)
|
||||||
this.session.setScrollTop(sm.top);
|
this.session.setScrollTop(-sm.top);
|
||||||
this.updateFull();
|
this.updateFull();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1002,7 +1002,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
minHeight : minHeight,
|
minHeight : minHeight,
|
||||||
maxHeight : maxHeight,
|
maxHeight : maxHeight,
|
||||||
offset : offset,
|
offset : offset,
|
||||||
gutterOffset : Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight),
|
gutterOffset : Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)),
|
||||||
height : this.$size.scrollerHeight
|
height : this.$size.scrollerHeight
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue