'p' to pause
This commit is contained in:
parent
4400f0eb7e
commit
a01c40b35a
@ -97,15 +97,22 @@ function! s:loop()
|
|||||||
|
|
||||||
call setline(sh + 2, printf(" SCORE: %6d", 0))
|
call setline(sh + 2, printf(" SCORE: %6d", 0))
|
||||||
|
|
||||||
|
let pause = 0
|
||||||
let retry = 0
|
let retry = 0
|
||||||
while 1
|
while 1
|
||||||
let c = getchar(0)
|
let c = getchar(0)
|
||||||
if c == 27 || c == 113 " esc or q
|
if c == 27 || c == 113 " esc or q to quit
|
||||||
" quit loop
|
" quit loop
|
||||||
break
|
break
|
||||||
|
elseif c == 112 " p to pause
|
||||||
|
let pause = !pause
|
||||||
|
endif
|
||||||
|
|
||||||
|
if pause
|
||||||
|
continue
|
||||||
endif
|
endif
|
||||||
if state == s:STATE_FINISH
|
if state == s:STATE_FINISH
|
||||||
if c == 114 " r
|
if c == 114 " r to retry
|
||||||
let retry = 1
|
let retry = 1
|
||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user