code: def afterExecSheet(self, sheet, escaped, err):
          'Records currentActiveRow'
          if not self.currentActiveRow:  # nothing to record
              return
  
          if err:
              self.currentActiveRow[-1] += ' [%s]' % err
  
          if isLoggableSheet(sheet):  # don't record jumps to cmdlog or other internal sheets
              # remove user-aborted commands and simple movements
              if not escaped and isLoggableCommand(self.currentActiveRow.keystrokes, self.currentActiveRow.longname):
                  self.addRow(self.currentActiveRow)
                  if options.cmdlog_histfile:
                      if not getattr(vd(), 'sessionlog', None):
                          vd().sessionlog = loadInternalSheet(CommandLog, Path(date().strftime(options.cmdlog_histfile)))
                      append_tsv_row(vd().sessionlog, self.currentActiveRow)
  
          self.currentActiveRow = Nonf afterExecSheet(self, sheet, escaped, err):
          'Records currentActiveRow'
          if not self.currentActiveRow:  # nothing to record
              return
  
          if err:
              self.currentActiveRow[-1] += ' [%s]' % err
  
          if isLoggableSheet(sheet):  # don't record jumps to cmdlog or other internal sheets
              # remove user-aborted commands and simple movements
              if not escaped and isLoggableCommand(self.currentActiveRow.keystrokes, self.currentActiveRow.longname):
                  self.addRow(self.currentActiveRow)
                  if options.cmdlog_histfile:
                      if not getattr(vd(), 'sessionlog', None):
                          vd().sessionlog = loadInternalSheet(CommandLog, Path(date().strftime(options.cmdlog_histfile)))
                      append_tsv_row(vd().sessionlog, self.currentActiveRow)
  
          self.currentActiveRow = None
docs: Records currentActiveRow