|
|
|
@ -104,6 +104,7 @@ THE SOFTWARE. |
|
|
|
|
SOL_CACHE_FILE = getFiles()[0]; |
|
|
|
|
|
|
|
|
|
editor.setValue( window.localStorage[SOL_CACHE_FILE], -1); |
|
|
|
|
editor.resize(true); |
|
|
|
|
session.setMode("ace/mode/javascript"); |
|
|
|
|
session.setTabSize(4); |
|
|
|
|
session.setUseSoftTabs(true); |
|
|
|
@ -393,8 +394,8 @@ THE SOFTWARE. |
|
|
|
|
|
|
|
|
|
var renderError = function(message) { |
|
|
|
|
var type = message.match(/^[0-9:]* Warning: /) ? 'warning' : 'error'; |
|
|
|
|
$('#output') |
|
|
|
|
.append($('<pre class="' + type + '"></pre>').text(message)); |
|
|
|
|
var $error = $('<pre class="' + type + '"></pre>').text(message); |
|
|
|
|
$('#output').append( $error ); |
|
|
|
|
var err = message.match(/^:([0-9]*):([0-9]*)/) |
|
|
|
|
if (err && err.length) { |
|
|
|
|
var errLine = parseInt(err[1], 10) - 1; |
|
|
|
@ -406,6 +407,10 @@ THE SOFTWARE. |
|
|
|
|
type: type |
|
|
|
|
}; |
|
|
|
|
editor.getSession().setAnnotations(sourceAnnotations); |
|
|
|
|
$error.click(function(ev){ |
|
|
|
|
editor.focus() |
|
|
|
|
editor.gotoLine(errLine + 1, errCol - 1, true); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|