Skip to content

Commit

Permalink
Merge pull request #1048 from Dyalog/modified_tab_ind
Browse files Browse the repository at this point in the history
Indicate modified tabs with circle, fix #615
  • Loading branch information
e9gille committed Aug 2, 2023
2 parents 2ca7021 + 3f96d1a commit cb8c13e
Show file tree
Hide file tree
Showing 6 changed files with 749 additions and 731 deletions.
2 changes: 2 additions & 0 deletions src/ed.js
Expand Up @@ -107,6 +107,7 @@ D.Ed = function Ed(ide, opts) { // constructor
const [, fn, op] = s.match(D.syntax.tradFnRE) || [];
return ed.container.setTitle(op || fn || ed.name);
}
ed.container.tab.closeElement.toggleClass('modified', true);
});

let mouseL = 0; let mouseC = 0; let mouseTS = 0;
Expand Down Expand Up @@ -549,6 +550,7 @@ D.Ed.prototype = {
const v = me.getValue();
ed.updStops();
const stop = ed.getStops();
ed.container.tab.closeElement.toggleClass('modified', false);
if (ed.tc || (v === ed.oText && `${stop}` === `${ed.oStop}`)) { // if tracer or unchanged
ed.isClosing && D.send('CloseWindow', { win: ed.id });
return;
Expand Down

0 comments on commit cb8c13e

Please sign in to comment.