mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-21 20:37:38 +00:00
ecomplete.el (ecomplete-display-matches): Intercept key sequence from terminal as well.
This commit is contained in:
parent
a7b88dc6d7
commit
e233ce558d
2 changed files with 10 additions and 4 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2011-09-13 Kan-Ru Chen <kanru@kanru.info>
|
||||
|
||||
* ecomplete.el (ecomplete-display-matches): Intercept key sequence from
|
||||
terminal as well.
|
||||
|
||||
2011-09-21 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* mm-view.el (mm-display-inline-fontify): Don't run doc-view-mode
|
||||
|
|
|
|||
|
|
@ -123,14 +123,15 @@
|
|||
(message "%s" matches)
|
||||
nil)
|
||||
(setq highlight (ecomplete-highlight-match-line matches line))
|
||||
(while (not (memq (setq command (read-event highlight)) '(? return)))
|
||||
(while (not (member (setq command (read-key-sequence-vector highlight))
|
||||
'([? ] [return] [?\r] [?\n] [?\C-g])))
|
||||
(cond
|
||||
((eq command ?\M-n)
|
||||
((member command '([27 ?n] [?\M-n]))
|
||||
(setq line (min (1+ line) max-lines)))
|
||||
((eq command ?\M-p)
|
||||
((member command '([27 ?p] [?\M-p]))
|
||||
(setq line (max (1- line) 0))))
|
||||
(setq highlight (ecomplete-highlight-match-line matches line)))
|
||||
(when (eq command 'return)
|
||||
(when (member command '([return] [?\r] [?\n]))
|
||||
(nth line (split-string matches "\n")))))))
|
||||
|
||||
(defun ecomplete-highlight-match-line (matches line)
|
||||
|
|
|
|||
Loading…
Reference in a new issue