Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitca0cfb3

Browse files
committed
fix fail to initialize bug
1 parent39e3df4 commitca0cfb3

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

‎src/editor/commands/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const createCommands = ({ context, machine, storage, git, position }: Cre
7070
},
7171
// launch a new tutorial
7272
// NOTE: may be better to move into action as logic is primarily non-vscode
73-
[COMMANDS.TUTORIAL_LAUNCH]:async(tutorial:CR.Tutorial)=>{
73+
[COMMANDS.TUTORIAL_LAUNCH]:async({tutorial, dispatch}:any)=>{
7474
console.log('launch tutorial')
7575

7676
awaitisEmptyWorkspace()
@@ -86,21 +86,21 @@ export const createCommands = ({ context, machine, storage, git, position }: Cre
8686
// eslint-disable-next-line
8787
const{ steps}=tutorial.data
8888
const{ setup}=steps[pos.stepId].actions
89-
awaitgit.gitLoadCommits(setup)
89+
awaitgit.gitLoadCommits(setup,dispatch)
9090
machine.send('TUTORIAL_LOADED')
9191
},
9292
[COMMANDS.TUTORIAL_SETUP]:async(tutorial:CR.Tutorial)=>{
9393
console.log('tutorial setup',tutorial)
9494
// setup onSave hook
9595
constlanguageIds=tutorial.meta.languages
9696
console.log(`languageIds:${languageIds.join(', ')}`)
97-
vscode.workspace.onDidSaveTextDocument((document:vscode.TextDocument)=>{
98-
console.log('save document',document)
99-
if(languageIds.includes(document.languageId)&&document.uri.scheme==='file'){
100-
// do work
101-
machine.send('TEST_RUN')
102-
}
103-
})
97+
//vscode.workspace.onDidSaveTextDocument((document: vscode.TextDocument) => {
98+
// console.log('save document', document)
99+
// if (languageIds.includes(document.languageId) && document.uri.scheme === 'file') {
100+
// // do work
101+
// machine.send('TEST_RUN')
102+
// }
103+
//})
104104
},
105105
// open a file
106106
[COMMANDS.OPEN_FILE]:async(relativeFilePath:string)=>{

‎src/state/actions/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default (dispatch: CR.EditorDispatch) => ({
4343
currentTutorial=tutorial
4444
console.log('api')
4545
console.log(tutorial)
46-
dispatch('coderoad.tutorial_launch',tutorial)
46+
dispatch('coderoad.tutorial_launch',{tutorial, dispatch})
4747
},
4848
tutorialSetup(){
4949
dispatch('coderoad.tutorial_setup',currentTutorial)

‎src/state/machine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const machine = (dispatch: CR.EditorDispatch) =>
5757
initial:'Initialize',
5858
onEntry:['tutorialSetup'],
5959
on:{
60-
WEBVIEW_INITIALIZED:'#tutorial-load-currents'
60+
WEBVIEW_INITIALIZED:'#tutorial-load-current'
6161
},
6262
states:{
6363
Initialize:{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp