Skip to content

Commit

Permalink
close tab when file dirty
Browse files Browse the repository at this point in the history
  • Loading branch information
rikarends committed Oct 25, 2010
1 parent 6b67c93 commit b112d04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/ext/console/console.js
Expand Up @@ -47,7 +47,7 @@ return ext.register("ext/console/console", {
// absolute workspace files
var wsRe = new RegExp(lang.escapeRegExp(workspaceDir) + "\\/([^:]*)(:\\d+)(:\\d+)*", "g");
// relative workspace files
var wsrRe = /(?:\s|^|\.\/)([\w\_\$-]+(?:\/[\w\_\$-]+)+\.[\w\_\$]+)(\:\d+)(\:\d+)*/g;
var wsrRe = /(?:\s|^|\.\/)([\w\_\$-]+(?:\/[\w\_\$-]+)+(?:\.[\w\_\$]+))?(\:\d+)(\:\d+)*/g;

for (var i=0; i<lines.length; i++) {
if (!lines[i]) continue;
Expand Down
5 changes: 4 additions & 1 deletion client/ext/save/save.js
Expand Up @@ -37,6 +37,7 @@ return ext.register("ext/save/save", {
winCloseConfirm.hide()
});
btnSaveNo.addEventListener("click", function(){
winCloseConfirm.all = -1;
winCloseConfirm.hide();
});
btnSaveCancel.addEventListener("click", function(){
Expand All @@ -52,8 +53,10 @@ return ext.register("ext/save/save", {
winCloseConfirm.show();

winCloseConfirm.addEventListener("hide", function(){
alert(winCloseConfirm.all);
if (winCloseConfirm.all != -100) {
tabEditors.remove(winCloseConfirm.page);
//debugger;
tabEditors.remove(winCloseConfirm.page, true);
winCloseConfirm.page.$at.undo(-1);
delete winCloseConfirm.page;
}
Expand Down
2 changes: 1 addition & 1 deletion common/ace
Submodule ace updated from d8239b to 7426ca

0 comments on commit b112d04

Please sign in to comment.