File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ export function showClearTranslationCachePopconfirm(ctx: Context) {
10
10
quickPick . title = 'Are you sure to clear translation cache?'
11
11
quickPick . matchOnDescription = true
12
12
quickPick . matchOnDetail = true
13
+ let routeJumping = false
14
+ quickPick . onDidChangeSelection ( ( ) => routeJumping = true )
13
15
defineQuickPickItems ( quickPick , [
14
16
{
15
17
label : '$(x) No' ,
@@ -28,12 +30,12 @@ export function showClearTranslationCachePopconfirm(ctx: Context) {
28
30
]
29
31
quickPick . onDidTriggerButton ( ( button ) => {
30
32
if ( button === QuickInputButtons . Back )
31
- showSettingsPopmenu ( ctx )
33
+ quickPick . hide ( )
32
34
} )
33
35
34
36
quickPick . onDidHide ( ( ) => {
35
- quickPick . dispose ( )
36
- showSettingsPopmenu ( ctx )
37
+ if ( ! routeJumping )
38
+ showSettingsPopmenu ( ctx )
37
39
} )
38
40
quickPick . show ( )
39
41
}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export function showSetKnownPopularWordInput(ctx: Context) {
8
8
const inputBox = window . createInputBox ( )
9
9
inputBox . title = 'Known Popular Words'
10
10
inputBox . value = String ( config . knownPopularWordCount || 0 )
11
+ let routeJumping = false
11
12
12
13
inputBox . onDidAccept ( ( ) => {
13
14
const count = Number ( inputBox . value )
@@ -16,6 +17,7 @@ export function showSetKnownPopularWordInput(ctx: Context) {
16
17
return
17
18
}
18
19
config . knownPopularWordCount = count
20
+ routeJumping = true
19
21
showTranslatePopmenu ( ctx )
20
22
} )
21
23
@@ -24,12 +26,12 @@ export function showSetKnownPopularWordInput(ctx: Context) {
24
26
]
25
27
inputBox . onDidTriggerButton ( ( button ) => {
26
28
if ( button === QuickInputButtons . Back )
27
- showTranslatePopmenu ( ctx )
29
+ inputBox . hide ( )
28
30
} )
29
31
30
32
inputBox . onDidHide ( ( ) => {
31
- inputBox . dispose ( )
32
- showSettingsPopmenu ( ctx )
33
+ if ( ! routeJumping )
34
+ showSettingsPopmenu ( ctx )
33
35
} )
34
36
inputBox . show ( )
35
37
}
Original file line number Diff line number Diff line change @@ -35,11 +35,10 @@ export function showSettingsPopmenu(ctx: Context) {
35
35
quickPick . buttons = [ QuickInputButtons . Back ]
36
36
quickPick . onDidTriggerButton ( ( button ) => {
37
37
if ( button === QuickInputButtons . Back )
38
- showTranslatePopmenu ( ctx )
38
+ quickPick . hide ( )
39
39
} )
40
40
41
41
quickPick . onDidHide ( ( ) => {
42
- quickPick . dispose ( )
43
42
if ( ! routeJumping )
44
43
showTranslatePopmenu ( ctx )
45
44
} )
You can’t perform that action at this time.
0 commit comments