Merge pull request #1900 from danyaPostfactum/miscfixes

Miscellaneous fixes
This commit is contained in:
Harutyun Amirjanyan 2014-04-08 23:11:03 +05:00
commit 32cbb0ffa1
3 changed files with 3 additions and 3 deletions

View file

@ -139,7 +139,7 @@ var Autocomplete = function() {
var max = this.popup.session.getLength() - 1;
switch(where) {
case "up": row = row < 0 ? max : row - 1; break;
case "up": row = row <= 0 ? max : row - 1; break;
case "down": row = row >= max ? -1 : row + 1; break;
case "start": row = 0; break;
case "end": row = max; break;

View file

@ -251,7 +251,7 @@ var TextInput = function(parentNode, host) {
var mime = USE_IE_MIME_TYPE ? "Text" : "text/plain";
if (data) {
// Safari 5 has clipboardData object, but does not handle setData()
return clipboardData.setData(mime, data);
return clipboardData.setData(mime, data) !== false;
} else {
return clipboardData.getData(mime);
}

View file

@ -93,7 +93,7 @@ function GutterHandler(mouseHandler) {
if (mouseHandler.$tooltipFollowsMouse) {
moveTooltip(mouseEvent);
} else {
var gutterElement = gutter.$cells[row].element;
var gutterElement = gutter.$cells[editor.session.documentToScreenRow(row, 0)].element;
var rect = gutterElement.getBoundingClientRect();
var style = tooltip.getElement().style;
style.left = rect.right + "px";