Skip to content

Commit

Permalink
Alleviate slowness of parsing huge 20k+ lines python files
Browse files Browse the repository at this point in the history
Do it by interrupting parsing if user is trying to do something.

See also: #103
  • Loading branch information
Hi-Angel committed Feb 5, 2023
1 parent d8a54e6 commit 6d9adbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion color-identifiers-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ arguments, loops (for .. in), or for comprehensions."
;; Function arguments
(save-excursion
(goto-char (point-min))
(while (python-nav-forward-defun)
(while (and (python-nav-forward-defun) (not (input-pending-p)))
(condition-case nil
(let ((arglist (sexp-at-point)))
(when (and arglist (listp arglist))
Expand Down

0 comments on commit 6d9adbd

Please sign in to comment.