From: Christian Heller Date: Tue, 3 Jun 2025 15:20:24 +0000 (+0200) Subject: Privatize PromptWidget.clear since it's no longer called elsewhere. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/processes?a=commitdiff_plain;h=7adaea84291421456d11529cb9626e8b72e2a087;p=ircplom Privatize PromptWidget.clear since it's no longer called elsewhere. --- diff --git a/ircplom.py b/ircplom.py index 09ebdc9..2674295 100755 --- a/ircplom.py +++ b/ircplom.py @@ -426,13 +426,13 @@ class PromptWidget(ScrollableWidget): if up and -(self._history_idx) < len(self._history): if self._history_idx == 0 and self._input_buffer: self._history += [self._input_buffer[:]] - self.clear() + self._clear() self._history_idx -= 1 self._history_idx -= 1 elif (not up) and self._history_idx < 0: self._history_idx += 1 if self._history_idx == 0: - self.clear() + self._clear() return else: return @@ -445,7 +445,7 @@ class PromptWidget(ScrollableWidget): self._history_idx = 0 self.draw() - def clear(self) -> None: + def _clear(self) -> None: 'Empty current content.' self._input_buffer = '' self.draw() @@ -455,7 +455,7 @@ class PromptWidget(ScrollableWidget): to_return = self._input_buffer[:] if to_return: self._history += [to_return] - self.clear() + self._clear() self.draw() return to_return