Skip to content

Commit

Permalink
fixed synth code snippet indentation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rlisahuang committed May 13, 2021
1 parent a346960 commit 3aa14b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@
"env": {
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null,
"VSCODE_SKIP_PRELAUNCH": "1",
"PYTHON3": "/usr/bin/python3",
"RUNPY": "/home/kas/projects/LooPy/vscode/src/run.py",
"IMGSUM": "/home/kas/projects/LooPy/vscode/src/img-summary.py",
"SNIPPY_UTILS": "/home/kas/projects/LooPy/vscode/src/snippy.py",
"PYTHON3": "/Users/lisa/.pyenv/shims/python3",
"RUNPY": "/Users/lisa/Desktop/ucsd-pl/SnipPy/vscode/src/run.py",
"IMGSUM": "/Users/lisa/Desktop/ucsd-pl/SnipPy/vscode/src/img-summary.py",
"SNIPPY_UTILS": "/Users/lisa/Desktop/ucsd-pl/SnipPy/vscode/src/snippy.py",
"JAVA": "/usr/bin/java",
"HEAP": "12G",
"SYNTH": "/home/kas/projects/LooPy/synthesizer/target/snippy-server-0.1-SNAPSHOT-jar-with-dependencies.jar"
// "HEAP": "12G",
"SYNTH": "/Users/lisa/Desktop/ucsd-pl/SnipPy/synthesizer/target/snippy-server-0.1-SNAPSHOT-jar-with-dependencies.jar"
},
"cleanUp": "wholeBrowser",
"urlFilter": "*workbench.html*",
Expand Down
3 changes: 2 additions & 1 deletion src/vs/editor/contrib/rtv/RTVSynth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,8 @@ export class RTVSynth {

// Add spaces for multiline results
if (fragment.includes('\n')) {
fragment = fragment.split('\n').join('\n' + '\t'.repeat(startCol - 1));
let indent = (model.getOptions()!.insertSpaces) ? ' ' : '\t';
fragment = fragment.split('\n').join('\n' + indent.repeat(startCol - 1));
}

this.editor.pushUndoStop();
Expand Down

0 comments on commit 3aa14b7

Please sign in to comment.