code: def clear_history(pymux, variables):
      " Clear scrollback buffer. "
      pane = pymux.arrangement.get_active_pane()
  
      if pane.display_scroll_buffer:
          raise CommandException('Not available in copy mode')
      else:
          pane.process.screen.clear_history(f clear_history(pymux, variables):
      " Clear scrollback buffer. "
      pane = pymux.arrangement.get_active_pane()
  
      if pane.display_scroll_buffer:
          raise CommandException('Not available in copy mode')
      else:
          pane.process.screen.clear_history()
docs: Clear scrollback buffer.