From c56299b992bad62900fb31e96719164ac2283a4c Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Wed, 10 Jun 2009 16:18:51 -0400 Subject: [PATCH] fix bug with get-token in modes that don't do tokenization --HG-- branch : pmacs2 --- method/introspect.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/method/introspect.py b/method/introspect.py index ee4dde5..2778f5f 100644 --- a/method/introspect.py +++ b/method/introspect.py @@ -91,6 +91,10 @@ class DumpAggregateTokenData(Method): class GetToken(Method): '''View type and data of the "current" token''' def _execute(self, w, **vargs): + if w.mode.name in w.buffer.highlights: + w.set_error('No Token Data') + return + token = w.get_token() if token is None: w.set_error('No Token')