Fix two small completion bugs
This commit is contained in:
parent
eefce5d839
commit
6035214d0e
|
@ -80,7 +80,7 @@
|
|||
(let ((prefix (to-complete-prefix to-complete)))
|
||||
(if prefix
|
||||
(complete-files/path (expand-file-name prefix (cwd)))
|
||||
(complete-files/path prefix))))
|
||||
(complete-files/path ""))))
|
||||
|
||||
;; #### no special treatment yet
|
||||
(define find-completions-for-redir find-completions-for-arg)
|
||||
|
@ -185,9 +185,6 @@
|
|||
(else
|
||||
(error "Unknown completion type" type)))))
|
||||
|
||||
(define (calculate-cursor-index to-complete completion)
|
||||
(+ (to-complete-pos to-complete) (string-length completion)))
|
||||
|
||||
(define (complete cmdln cursor-index)
|
||||
(debug-message "complete " cmdln ", " cursor-index)
|
||||
(let* ((parsed
|
||||
|
@ -206,7 +203,7 @@
|
|||
parsed (lambda (to-complete)
|
||||
(display (car completions)))))
|
||||
(lambda (completed-line cursor-index)
|
||||
(list completed-line cursor-index parsed))))
|
||||
(list completed-line cursor-index to-complete parsed))))
|
||||
(else
|
||||
(list completions cursor-index to-complete parsed))))))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue