Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 4b9a6ed

Browse files
committed
Improved comments
1 parent d021778 commit 4b9a6ed

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/editor/InlineTextEditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ define(function (require, exports, module) {
247247
$lineNumber.text(inlineInfo.editor.getFirstVisibleLine() + 1);
248248
});
249249

250-
// If Document's file is deleted, or Editor loses sync with Document
250+
// If Document's file is deleted, or Editor loses sync with Document, delegate to this._onLostContent()
251251
$(inlineInfo.editor).on("lostContent", function () {
252252
self._onLostContent.apply(self, arguments);
253253
});

src/editor/MultiRangeInlineEditor.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,11 @@ define(function (require, exports, module) {
467467
};
468468

469469
/**
470-
* If Document's file is deleted, or Editor loses sync with Document
470+
* Overwrite InlineTextEditor's _onLostContent to do nothing if the document's file is deleted
471+
* (deletes are handled via TextRange's lostSync).
471472
*/
472473
MultiRangeInlineEditor.prototype._onLostContent = function (event, cause) {
473-
// Ignore when the editor's content got lost due to a deleted file, this is handled via TextRange's lostSync
474+
// Ignore when the editor's content got lost due to a deleted file
474475
if (cause && cause.type === "deleted") { return; }
475476
// Else yield to the parent's implementation
476477
return this.parentClass._onLostContent.apply(this, arguments);

0 commit comments

Comments
 (0)