snap scrolling to edges

(it doesn't make sense to have editor scrolled by just one char)
This commit is contained in:
nightwing 2011-12-08 21:27:18 +04:00
commit 0d02902831

View file

@ -715,7 +715,7 @@ var VirtualRenderer = function(container, theme) {
};
this.scrollToX = function(scrollLeft) {
if (scrollLeft <= this.$padding)
if (scrollLeft <= this.$padding + 2 * this.layerConfig.characterWidth)
scrollLeft = 0;
this.scroller.scrollLeft = scrollLeft;