You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Always run the worksheet after all changes have been applied
In 23785e6, we moved worksheet.run()
from didSave to willSave since didSave is not called when the document
is not dirty, unfortunately this gives the wrong behavior when the
document _is_ dirty: it means we're going to send a run worksheet
request to the server before the server has seen all the changes to the
document, in particular with multi-line output this means that the
server will see the output with the added empty lines, which means the
line numbers in worksheet/publishOutput will be wrong. To avoid this
issue we now run the worksheet either on willSave or didSave depending
on whether the document is dirty or not.
To reproduce the issue, you can create a worksheet with:
```
val x = """
"""
"hi"
```
in it, then save the document multiple times.
0 commit comments