Example #1
0
    def on_event(self, context):
        self.debug('on_event: %s', context['event'])
        self.check_recache(context)

        for source_name, source in self.itersource(context):
            if hasattr(source, 'on_event'):
                self.debug('on_event Source: %s (%s)', source_name)
                source.on_event(context)
Example #2
0
 def _on_event(self, context):
     for source_name, source in self._itersource(context):
         if hasattr(source, 'on_event'):
             self.debug('on_event: Source: %s', source_name)
             try:
                 source.on_event(context)
             except Exception as exc:
                 error_tb(self._vim, 'Exception during {}.on_event '
                          'for event {!r}: {}'.format(
                              source_name, context['event'], exc))
Example #3
0
 def _on_event(self, context):
     for source_name, source in self._itersource(context):
         if source.events is None or context['event'] in source.events:
             self.debug('on_event: Source: %s', source_name)
             try:
                 source.on_event(context)
             except Exception as exc:
                 error_tb(self._vim, 'Exception during {}.on_event '
                          'for event {!r}: {}'.format(
                              source_name, context['event'], exc))
Example #4
0
 def _on_event(self, context):
     event = context['event']
     for source_name, source in self._itersource(context):
         if source.events is None or event in source.events:
             try:
                 source.on_event(context)
             except Exception as exc:
                 error_tb(self._vim, 'Exception during {}.on_event '
                          'for event {!r}: {}'.format(
                              source_name, event, exc))
Example #5
0
 def _on_event(self, context):
     event = context['event']
     for source_name, source in self._itersource(context):
         if source.events is None or event in source.events:
             try:
                 source.on_event(context)
             except Exception as exc:
                 error_tb(
                     self._vim, 'Exception during {}.on_event '
                     'for event {!r}: {}'.format(source_name, event, exc))
Example #6
0
    def on_event(self, context):
        self.debug('on_event: %s', context['event'])
        self.check_recache(context)

        for source_name, source in self.itersource(context):
            if hasattr(source, 'on_event'):
                self.debug('on_event: Source: %s', source_name)
                try:
                    source.on_event(context)
                except Exception as exc:
                    error_tb(self._vim, 'Exception during {}.on_event '
                             'for event {!r}: {}'.format(
                                 source_name, context['event'], exc))
Example #7
0
    def _on_event(self, context):
        event = context['event']
        for source_name, source in self._itersource(context):
            if source.events is None or event in source.events:
                try:
                    source.on_event(context)
                except Exception as exc:
                    error_tb(self._vim,
                             f'Exception during {source.name}.on_event '
                             'for event {!r}: {}'.format(event, exc))

        for f in self._filters.values():
            f.on_event(context)
Example #8
0
    def _on_event(self, context):
        event = context['event']
        for source_name, source in self._itersource(context):
            if source.events is None or event in source.events:
                try:
                    source.on_event(context)
                except Exception as exc:
                    error_tb(self._vim,
                             f'Exception during {source.name}.on_event '
                             'for event {!r}: {}'.format(event, exc))

        for f in self._filters.values():
            f.on_event(context)