Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6096a44

Browse files
committed
Fix autocomplete order
1 parent d969204 commit 6096a44

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

‎src/kernel.lisp

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,23 +1519,25 @@
15191519
(cursor-pos (gethash "cursor_pos" content))
15201520
(match-set (make-match-set :start cursor-pos :end cursor-pos :code code)))
15211521
(multiple-value-bind (ename evalue traceback)
1522-
(let ((*package* package)
1523-
(*readtable* readtable))
1524-
(complete-code *kernel* match-set code cursor-pos))
1525-
(if ename
1526-
(send-complete-reply-error ename evalue traceback)
1527-
(send-complete-reply-ok (sort (mapcar #'match-text (match-set-matches match-set)) #'string<)
1528-
(match-set-start match-set)
1529-
(match-set-end match-set)
1530-
(list :object-plist
1531-
"_jupyter_types_experimental" (or (mapcan (lambda (match)
1532-
(when (match-type match)
1533-
(list (list :object-plist
1534-
"text" (match-text match)
1535-
"type" (match-type match)))))
1536-
(match-set-matches match-set))
1537-
:empty-array))))))))
1538-
1522+
(let ((*package* package)
1523+
(*readtable* readtable))
1524+
(complete-code *kernel* match-set code cursor-pos))
1525+
(cond (ename
1526+
(send-complete-reply-error ename evalue traceback))
1527+
(t
1528+
(setf (match-set-matches match-set)
1529+
(sort (match-set-matches match-set) #'string< :key #'match-text))
1530+
(send-complete-reply-ok (mapcar #'match-text (match-set-matches match-set))
1531+
(match-set-start match-set)
1532+
(match-set-end match-set)
1533+
(list :object-plist
1534+
"_jupyter_types_experimental" (or (mapcan (lambda (match)
1535+
(when (match-type match)
1536+
(list (list :object-plist
1537+
"text" (match-text match)
1538+
"type" (match-type match)))))
1539+
(match-set-matches match-set))
1540+
:empty-array)))))))))
15391541

15401542
(defun handle-comm-info-request ()
15411543
(inform :info *kernel* "Handling comm_info_request message")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /