Skip to content

Commit

Permalink
gutter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Jongboom committed Oct 18, 2011
1 parent 9c67add commit 89dadab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/ace/css/editor.css
Expand Up @@ -6,6 +6,8 @@
overflow: hidden;
font-family: 'Monaco', 'Menlo', 'Droid Sans Mono', 'Courier New', monospace;
font-size: 12px;
width: 100%;
height: 100%;
}

.ace_scroller {
Expand Down
11 changes: 9 additions & 2 deletions lib/ace/virtual_renderer.js
Expand Up @@ -819,8 +819,15 @@ var VirtualRenderer = function(container, theme) {

// force re-measure of the gutter width
if (_self.$size) {
_self.$size.width = 0;
_self.onResize();
var checkGutterInitialized = function () {
// if offset width larger than 0 than force resize
if (_self.$gutter.offsetWidth > 0) {
_self.onResize(true);
} else {
setTimeout(checkGutterInitialized, 50); // try again in 50 ms.
}
};
checkGutterInitialized();
}
}
};
Expand Down

0 comments on commit 89dadab

Please sign in to comment.