some bug fixes
svn: r3729
This commit is contained in:
parent
827ee8b2b8
commit
e14e007d23
|
@ -452,6 +452,7 @@
|
||||||
;; thing)
|
;; thing)
|
||||||
(set! nonstring-path (and (path? str) str))
|
(set! nonstring-path (and (path? str) str))
|
||||||
(send text set-value (if nonstring-path "" str))
|
(send text set-value (if nonstring-path "" str))
|
||||||
|
(reset-last-text-state)
|
||||||
(unless (and (pair? no-focus?) (car no-focus?)) (send text focus))
|
(unless (and (pair? no-focus?) (car no-focus?)) (send text focus))
|
||||||
(send text* select-all)
|
(send text* select-all)
|
||||||
(set-ok?))
|
(set-ok?))
|
||||||
|
@ -507,6 +508,12 @@
|
||||||
(define last-text-end 0)
|
(define last-text-end 0)
|
||||||
(define last-text-completed? #f) ; is the last region a completion?
|
(define last-text-completed? #f) ; is the last region a completion?
|
||||||
|
|
||||||
|
(define (reset-last-text-state)
|
||||||
|
(set! last-text-value "")
|
||||||
|
(set! last-text-start 0)
|
||||||
|
(set! last-text-end 0)
|
||||||
|
(set! last-text-completed? #f))
|
||||||
|
|
||||||
(define (text-callback . key)
|
(define (text-callback . key)
|
||||||
(send completion-timer wait)
|
(send completion-timer wait)
|
||||||
(let* ([value (send text get-value)]
|
(let* ([value (send text get-value)]
|
||||||
|
@ -519,6 +526,7 @@
|
||||||
(set! last-text-start start)
|
(set! last-text-start start)
|
||||||
(set! last-text-end end)
|
(set! last-text-end end)
|
||||||
(set! last-text-completed? #f))
|
(set! last-text-completed? #f))
|
||||||
|
(set! nonstring-path #f)
|
||||||
(when change?
|
(when change?
|
||||||
;; if entered an existing directory, go there
|
;; if entered an existing directory, go there
|
||||||
(let loop ()
|
(let loop ()
|
||||||
|
@ -528,9 +536,7 @@
|
||||||
[pfx (build-path* dir pfx)])
|
[pfx (build-path* dir pfx)])
|
||||||
(when (directory-exists? pfx)
|
(when (directory-exists? pfx)
|
||||||
(set-dir pfx)
|
(set-dir pfx)
|
||||||
(set! last-text-value "")
|
(reset-last-text-state)
|
||||||
(set! last-text-start 0)
|
|
||||||
(set! last-text-end 0)
|
|
||||||
(set! value (substring value (cdar m)))
|
(set! value (substring value (cdar m)))
|
||||||
(set! start (string-length value))
|
(set! start (string-length value))
|
||||||
(set! end start)
|
(set! end start)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user