mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-12 07:30:34 +01:00
- revert to old completion method for non URI;
- added type declaration to remove optimization note.
This commit is contained in:
parent
d4654beb82
commit
fa12f56d10
@ -335,13 +335,13 @@ be either `:keybinding' or `:string'. the former for key command the latter for
|
|||||||
(suggestions-window:update-suggestions suggestions-win
|
(suggestions-window:update-suggestions suggestions-win
|
||||||
command-line)
|
command-line)
|
||||||
(if candidates
|
(if candidates
|
||||||
(progn
|
(if (null common-prefix)
|
||||||
(when (length= candidates 1)
|
(insert-selected-suggestion object)
|
||||||
(win-hide suggestions-win))
|
(progn
|
||||||
(if common-prefix
|
(when (length= candidates 1)
|
||||||
|
(win-hide suggestions-win))
|
||||||
(setf command-line common-prefix)
|
(setf command-line common-prefix)
|
||||||
(setf command-line (complete:shortest-candidate candidates)))
|
(move-point-to-end object command-line)))
|
||||||
(move-point-to-end object command-line))
|
|
||||||
(win-hide suggestions-win))))
|
(win-hide suggestions-win))))
|
||||||
object)
|
object)
|
||||||
|
|
||||||
@ -520,7 +520,7 @@ command line."
|
|||||||
(move-point-to-start command-window)
|
(move-point-to-start command-window)
|
||||||
(set-keybinding-mode command-window))
|
(set-keybinding-mode command-window))
|
||||||
((char= #\Tab event)
|
((char= #\Tab event)
|
||||||
(insert-selected-suggestion command-window))
|
(complete-at-point command-window))
|
||||||
(t
|
(t
|
||||||
(if (null suggestions-win)
|
(if (null suggestions-win)
|
||||||
(setf suggestions-win (complete-window:init))
|
(setf suggestions-win (complete-window:init))
|
||||||
|
@ -239,7 +239,14 @@ list af all possible candidtae for completion."
|
|||||||
(uri-matcher hint bag)
|
(uri-matcher hint bag)
|
||||||
(when matched-strings
|
(when matched-strings
|
||||||
(values matched-strings
|
(values matched-strings
|
||||||
(reduce-to-common-prefix matched-strings)
|
nil ;for fuzzy search common prefix does
|
||||||
|
;not makes sense; note also that
|
||||||
|
;setting this to nil will force
|
||||||
|
;selecting the first item in
|
||||||
|
;'complete-window' (see:
|
||||||
|
;complete-at-point and
|
||||||
|
;insert-selected-suggestion),
|
||||||
|
|
||||||
indices))))))
|
indices))))))
|
||||||
|
|
||||||
(defun complete-chat-message (hint)
|
(defun complete-chat-message (hint)
|
||||||
|
@ -467,6 +467,8 @@
|
|||||||
(when (downloading-allowed-p wrapper-object)
|
(when (downloading-allowed-p wrapper-object)
|
||||||
(multiple-value-bind (buffer read-so-far)
|
(multiple-value-bind (buffer read-so-far)
|
||||||
(read-array download-stream +read-buffer-size+)
|
(read-array download-stream +read-buffer-size+)
|
||||||
|
(declare ((vector (unsigned-byte 8)) buffer))
|
||||||
|
(declare (fixnum read-so-far))
|
||||||
(increment-bytes-count wrapper-object read-so-far)
|
(increment-bytes-count wrapper-object read-so-far)
|
||||||
(if (< read-so-far (length buffer))
|
(if (< read-so-far (length buffer))
|
||||||
(progn
|
(progn
|
||||||
|
Loading…
x
Reference in New Issue
Block a user