aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2019-11-02 13:03:50 +0000
committerAlan Mackenzie2019-11-02 13:03:50 +0000
commitec16dd1a1e0cc4c315fb57f8720083aabfd434e5 (patch)
tree268b46c9cc6ff398556d32963ec9a149572774fd
parent6911ef3da69333cb7adc1a7fb0a0fc001220a0c4 (diff)
downloademacs-ec16dd1a1e0cc4c315fb57f8720083aabfd434e5.tar.gz
emacs-ec16dd1a1e0cc4c315fb57f8720083aabfd434e5.zip
CC Mode. Fix slow scrolling by adding a search limit.
This fixes bug #10149. * lisp/progmodes/cc-fonts.el (c-font-lock-single-decl) Limit the search by c-go-up-list-backwards to 500 non-literal characters.
-rw-r--r--lisp/progmodes/cc-fonts.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index f58caf2f1ae..c27b70603ed 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1244,7 +1244,7 @@ casts and declarations are fontified. Used on level 2 and higher."
1244 (if (save-excursion 1244 (if (save-excursion
1245 (and 1245 (and
1246 (car (cddr decl-or-cast)) ; maybe-expression flag. 1246 (car (cddr decl-or-cast)) ; maybe-expression flag.
1247 (c-go-up-list-backward) 1247 (c-go-up-list-backward nil (c-determine-limit 500))
1248 (eq (char-after) ?\() 1248 (eq (char-after) ?\()
1249 (progn (c-backward-syntactic-ws) 1249 (progn (c-backward-syntactic-ws)
1250 (c-simple-skip-symbol-backward)) 1250 (c-simple-skip-symbol-backward))