Skip to content

Commit

Permalink
Merge pull request #15716 from ccordoba12/issue-15712
Browse files Browse the repository at this point in the history
PR: Catch another KeyError when trying to highlight a folding block (Editor)
  • Loading branch information
ccordoba12 committed May 27, 2021
2 parents fd2e0fa + 77f7d42 commit 001b5b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spyder/plugins/editor/utils/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,13 @@ def cancel_requests(self):
def _exec_requested_job(self):
"""Execute the requested job after the timer has timeout."""
self._timer.stop()
self._job(*self._args, **self._kwargs)

try:
self._job(*self._args, **self._kwargs)
except KeyError:
# Catching the KeyError above is necessary to avoid
# issue spyder-ide/spyder#15712.
pass


class TextHelper(object):
Expand Down

0 comments on commit 001b5b7

Please sign in to comment.