Function: dape--maybe-select-thread
dape--maybe-select-thread is a natively compiled function defined in
dape.el.
Signature
(dape--maybe-select-thread CONN THREAD-ID &optional FORCE)
Documentation
Maybe set selected THREAD-ID and CONN.
If FORCE is non-nil, force selection of the thread.
If the thread is selected, also select CONN if no connection has been
selected yet, or if the currently selected connection has no stopped
threads.
See dape--connection-selected.
Source Code
;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape--maybe-select-thread (conn thread-id &optional force)
"Maybe set selected THREAD-ID and CONN.
If FORCE is non-nil, force selection of the thread.
If the thread is selected, also select CONN if no connection has been
selected yet, or if the currently selected connection has no stopped
threads.
See `dape--connection-selected'."
(when (and thread-id (or force (not (dape--thread-id conn))))
(setf (dape--thread-id conn) thread-id)
;; Update selected connection if the current one is not live or
;; has no stopped threads.
(unless (and (member dape--connection-selected (dape--live-connections))
(dape--stopped-threads dape--connection-selected))
(setq dape--connection-selected conn))))