jupyter / jupyter-js-notebook

JupyterLab notebook
BSD 3-Clause "New" or "Revised" License
46 stars 18 forks source link

Completion tweak #233

Closed afshin closed 8 years ago

afshin commented 8 years ago

After talking with @sccolbert, this PR changes the way that the editor widget's text and cursor position are updated, relying on CodeMirror's internal operation queue to guarantee things happen in the correct order.

As a result, there is no longer a need for an onUpdateRequest.

cc @blink1073 @jasongrout, you might both be curious about this.

jasongrout commented 8 years ago

Is the point here that you are making things synchronous instead of asynchronous (async because you were using the update message)?

blink1073 commented 8 years ago

@jasongrout, yep. Released as jupyter-js-notebook@0.21.3.

afshin commented 8 years ago

@jasongrout yeah, that's right. Because CodeMirror already has an internal queue for operations, adding a text update and a cursor position update in sequential order means they'll be correctly enqueued, so we don't have to do anything special to set both the data model and the widget