On Thu, Apr 4, 2019 at 6:15 AM Jordi Gutiérrez Hermoso <jord...@octave.org> wrote:
> # HG changeset patch > # User Jordi Gutiérrez Hermoso <jord...@octave.org> > # Date 1554347266 14400 > # Wed Apr 03 23:07:46 2019 -0400 > # Node ID 263cec9c08fc1b517847fe53f27b47978be127f4 > # Parent 4ee906aa7b60fb6b113e4dc187fbb5a8f42e557c > chistedit: use default curses colours > > Terminals will define default colours (for example, white text on > black background), but curses doesn't obey those default colours > unless told to do so. > > Calling `curses.use_default_colors` makes curses obey the default > terminal colours. One of the most obvious effects is that this allows > transparency on terminals that support it. > > This also brings chistedit closer in appearance to crecord, which also > uses default colours. > > diff --git a/hgext/histedit.py b/hgext/histedit.py > --- a/hgext/histedit.py > +++ b/hgext/histedit.py > @@ -1238,6 +1238,8 @@ def patchcontents(state): > return displayer.hunk[rule.ctx.rev()].splitlines() > > def _chisteditmain(repo, rules, stdscr): > + curses.use_default_colors() > This can raise curses.error. We need to catch that. Related: https://www.mercurial-scm.org/repo/hg-committed/rev/fb2e59e92651c33918987b9bbf84cedb37ac2557
_______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel