branch: externals/inspector commit b4ff75dda18de34c02d9edb95ad511443041f238 Author: Mariano Montone <marianomont...@gmail.com> Commit: Mariano Montone <marianomont...@gmail.com>
Paginate hash-table inspection --- inspector.el | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/inspector.el b/inspector.el index 6c7200d025..f5be9afb62 100644 --- a/inspector.el +++ b/inspector.el @@ -458,12 +458,20 @@ If LABEL has a value, then it is used as button label. Otherwise, button label (progn (inspector--insert-label "Values") (newline) - (maphash (lambda (key value) - (inspector--insert-inspect-button key) - (insert ": ") - (inspector--insert-inspect-button value) - (newline)) - hash-table)))) + (let ((i 0) + (keys (hash-table-keys hash-table))) + (inspector--do-with-slicer-and-more-button + (lambda () + (when (< i (length keys)) + (cl-subseq keys i (min (cl-incf i inspector-slice-size) + (length keys))))) + (lambda (slice cont) + (ignore cont) + (dolist (key slice) + (inspector--insert-inspect-button key) + (insert ": ") + (inspector--insert-inspect-button (gethash key hash-table)) + (newline)))))))) ;;--- Buffers ------------------------------