Mercurial > public > mercurial-scm > hg-stable
diff mercurial/ui.py @ 53023:b12a4b9d09ce
branching: correct merge of stable into default
For unclear reason, b7afc38468bd dropped all the change to
"contrib/heptapod-ci.yml". This is the same merge as b7afc38468bd, but merging
heptapod-ci.yml change from stable too.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 28 Feb 2025 23:18:22 +0100 |
parents | 4cb75772818d b3214b7d2390 |
children |
line wrap: on
line diff
--- a/mercurial/ui.py Mon Dec 09 06:23:34 2024 +0100 +++ b/mercurial/ui.py Fri Feb 28 23:18:22 2025 +0100 @@ -262,6 +262,8 @@ self.logblockedtimes = False # color mode: see mercurial/color.py for possible value self._colormode = None + # readline prompt: is this currently for a readline prompt? + self._readlineprompt = False self._terminfoparams = {} self._styles = {} self._uninterruptible = False @@ -1741,7 +1743,12 @@ self.flush() prompt = b' ' else: - prompt = self.label(prompt, b'ui.prompt') + b' ' + wasreadlineprompt = self._readlineprompt + try: + self._readlineprompt = True + prompt = self.label(prompt, b'ui.prompt') + b' ' + finally: + self._readlineprompt = wasreadlineprompt # prompt ' ' must exist; otherwise readline may delete entire line # - http://bugs.python.org/issue12833