code: def refresh_plugin(self):
          
          curdir = getcwd_or_home()
          self.pathedit.add_text(curdir)
          self.save_wdhistory()
          self.set_previous_enabled.emit(
                               self.histindex is not None and self.histindex > 0)
          self.set_next_enabled.emit(self.histindex is not None and \
                                     self.histindex < len(self.history)-1)
docs: Refresh widget