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

Fix Delete Line to avoid exceptions and work intuitively in inline editors #1932

Merged
merged 2 commits into from Oct 26, 2012

Conversation

njx
Copy link
Member

@njx njx commented Oct 24, 2012

For #1764, removed the exception on losing visible range during edits, and tweaked Delete Line so that it always remains within visible range boundaries.

Also adds unit tests for Delete Line (there weren't any before).

@peterflynn, would you mind taking a look?

@ghost ghost assigned peterflynn Oct 24, 2012
if (this._visibleRange.startLine === null || this._visibleRange.endLine === null) {
throw new Error("ERROR: Typing in Editor should not destroy its own _visibleRange");
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this seems reasonable to me. InlineEditorProviders-test contains a solid suite of tests ("Inline Editor range updating") that make sure inline editors don't lose sync and close at the wrong times, and at least a few tests that also cover Document-Editor syncing.

@peterflynn
Copy link
Member

@njx: done reviewing. Great thorough set of tests, btw.

@njx
Copy link
Member Author

njx commented Oct 25, 2012

Ready for re-review.

@peterflynn
Copy link
Member

Looks good with those changes -- merging

peterflynn added a commit that referenced this pull request Oct 26, 2012
Fix Delete Line to avoid exceptions and work intuitively in inline editors
@peterflynn peterflynn merged commit 444bd1f into master Oct 26, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants