Skip to content

Commit 4ad71b3

Browse files
committed
unfold chunks to reveal execution status in notebook
1 parent 8b195c9 commit 4ad71b3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/gwt/src/org/rstudio/studio/client/workbench/views/source/editors/text/rmd/TextEditingTargetNotebook.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
import org.rstudio.studio.client.workbench.views.source.editors.text.TextEditingTargetRMarkdownHelper;
7171
import org.rstudio.studio.client.workbench.views.source.editors.text.ace.LineWidget;
7272
import org.rstudio.studio.client.workbench.views.source.editors.text.ace.Position;
73+
import org.rstudio.studio.client.workbench.views.source.editors.text.ace.Range;
7374
import org.rstudio.studio.client.workbench.views.source.editors.text.events.RenderFinishedEvent;
7475
import org.rstudio.studio.client.workbench.views.source.editors.text.events.ScopeTreeReadyEvent;
7576
import org.rstudio.studio.client.workbench.views.source.editors.text.events.EditorThemeStyleChangedEvent;
@@ -1149,12 +1150,20 @@ private void processChunkExecQueue()
11491150

11501151
if (unit.mode == MODE_BATCH)
11511152
updateProgress();
1152-
1153+
11531154
// let the chunk widget know it's started executing
11541155
if (outputs_.containsKey(unit.chunkId))
11551156
{
11561157
ChunkOutputUi output = outputs_.get(unit.chunkId);
11571158

1159+
// expand the chunk if it's in a fold
1160+
Scope scope = output.getScope();
1161+
if (scope != null)
1162+
{
1163+
docDisplay_.unfold(Range.fromPoints(scope.getPreamble(),
1164+
scope.getEnd()));
1165+
}
1166+
11581167
output.getOutputWidget().setCodeExecuting(true, executingChunk_.mode);
11591168
syncWidth();
11601169

0 commit comments

Comments
 (0)