Dirty bit management #826

Merged
merged 2 commits into from May 8, 2012

Conversation

Projects
None yet
2 participants
@jhatwich
Member

jhatwich commented May 8, 2012

Depends on changes in CodeMirror2 pull request #56 - isDirty and markClean APIs. adobe/CodeMirror2#56

Also discussed here: http://groups.google.com/group/brackets-dev/browse_thread/thread/c3788f47cecaf0b1

Josh Hatwich
Dirty bit management
Depends on changes in CodeMirror2, the isDirty and markClean APIs.
src/document/DocumentManager.js
@@ -542,10 +542,14 @@ define(function (require, exports, module) {
// On any change, mark the file dirty. In the future, we should make it so that if you
// undo back to the last saved state, we mark the file clean.
var wasDirty = this.isDirty;
- this.isDirty = true;
+ if (editor._codeMirror.isDirty) {

This comment has been minimized.

@gruehle

gruehle May 8, 2012

Member

Your CodeMirror changes have been merged in, so this test here is no longer needed. Would you mind removing it?

@gruehle

gruehle May 8, 2012

Member

Your CodeMirror changes have been merged in, so this test here is no longer needed. Would you mind removing it?

src/document/DocumentManager.js
@@ -562,6 +566,9 @@ define(function (require, exports, module) {
*/
Document.prototype._markClean = function () {
this.isDirty = false;
+ if (this._masterEditor && this._masterEditor._codeMirror.markClean) {

This comment has been minimized.

@gruehle

gruehle May 8, 2012

Member

Same here - this if statement can be removed.

@gruehle

gruehle May 8, 2012

Member

Same here - this if statement can be removed.

@gruehle

This comment has been minimized.

Show comment
Hide comment
@gruehle

gruehle May 8, 2012

Member

Thanks for isolating these changes into a new pull request. I've merged in your CodeMirror changes, so the defensive checks to make sure the APIs are defined are no longer needed.

Member

gruehle commented May 8, 2012

Thanks for isolating these changes into a new pull request. I've merged in your CodeMirror changes, so the defensive checks to make sure the APIs are defined are no longer needed.

@jhatwich

This comment has been minimized.

Show comment
Hide comment
@jhatwich

jhatwich May 8, 2012

Member

Thanks for reviewing. The defensive checks are now removed.

Member

jhatwich commented May 8, 2012

Thanks for reviewing. The defensive checks are now removed.

@gruehle gruehle merged commit 629ece8 into adobe:master May 8, 2012

@gruehle

This comment has been minimized.

Show comment
Hide comment
@gruehle

gruehle May 8, 2012

Member

Looks good! Merging.

Member

gruehle commented May 8, 2012

Looks good! Merging.

@gruehle

This comment has been minimized.

Show comment
Hide comment
@gruehle

gruehle May 10, 2012

Member

@jhatwich - Hey Josh, could you take a look at issue #854? There is a bug with the new dirty bit code. Thanks!

Member

gruehle commented May 10, 2012

@jhatwich - Hey Josh, could you take a look at issue #854? There is a bug with the new dirty bit code. Thanks!

gideonthomas pushed a commit to gideonthomas/brackets that referenced this pull request Aug 31, 2017

Fix #499: Add inline editor and inline doc provider querying and eve…
…nts (#826)

* Fix #499: Add inline editor and inline doc provider querying and events

* First working attempt at integrated UX for inline docs and editors, wip

* Hack to allow for testing button clicks in popover

* Updated styling for the "tinker" indicator.

* Fixes

* Clean up interaction per review

* Removed box shadow from the arrow element.

* Deal with first scroll/focus auto-hiding popover

* Remove console.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment