adjusted esc and control-g wrt snapback and search
svn: r10947
This commit is contained in:
parent
eaf979b749
commit
a007b9cde8
|
@ -1947,13 +1947,21 @@
|
||||||
(send search/replace-keymap add-function "hide-search"
|
(send search/replace-keymap add-function "hide-search"
|
||||||
(λ (text evt)
|
(λ (text evt)
|
||||||
(let ([tlw (send text get-top-level-window)])
|
(let ([tlw (send text get-top-level-window)])
|
||||||
|
(when tlw
|
||||||
|
(send tlw hide-search)))))
|
||||||
|
|
||||||
|
(send search/replace-keymap map-function "c:g" "hide-search-and-snap-back")
|
||||||
|
(send search/replace-keymap add-function "hide-search-and-snap-back"
|
||||||
|
(λ (text evt)
|
||||||
|
(let ([tlw (send text get-top-level-window)])
|
||||||
|
(when tlw
|
||||||
(when (preferences:get 'framework:anchored-search)
|
(when (preferences:get 'framework:anchored-search)
|
||||||
(let ([text-to-search (send tlw get-text-to-search)])
|
(let ([text-to-search (send tlw get-text-to-search)])
|
||||||
(when text-to-search
|
(when text-to-search
|
||||||
(let ([anchor-pos (send text-to-search get-anchor-pos)])
|
(let ([anchor-pos (send text-to-search get-anchor-pos)])
|
||||||
(when anchor-pos
|
(when anchor-pos
|
||||||
(send text-to-search set-position anchor-pos))))))
|
(send text-to-search set-position anchor-pos))))))
|
||||||
(send tlw hide-search))))
|
(send tlw hide-search)))))
|
||||||
|
|
||||||
(define searchable-canvas%
|
(define searchable-canvas%
|
||||||
(class editor-canvas%
|
(class editor-canvas%
|
||||||
|
|
Loading…
Reference in New Issue
Block a user