fix bug with get-token in modes that don't do tokenization
--HG-- branch : pmacs2
This commit is contained in:
parent
7e36a08844
commit
c56299b992
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue