# HG changeset patch
# User Jordi Gutiérrez Hermoso <jord...@octave.org>
# Date 1572478497 14400
#      Wed Oct 30 19:34:57 2019 -0400
# Node ID b2db799c5a1d3a66961246f9c7598db3dc63c4de
# Parent  0ad29bd65ab45822e2e2a6630860269832aca2fe
histedit: define new colour pairs for roll action

Red seems like a good colour to indicate removal, since that's the
colour we use in diffs. We need three varieties with three different
backgrounds corresponding to the possible ways we can display a rule.

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1056,6 +1056,7 @@ ACTION_LABELS = {
 
 COLOR_HELP, COLOR_SELECTED, COLOR_OK, COLOR_WARN, COLOR_CURRENT = 1, 2, 3, 4, 5
 COLOR_DIFF_ADD_LINE, COLOR_DIFF_DEL_LINE, COLOR_DIFF_OFFSET = 6, 7, 8
+COLOR_ROLL, COLOR_ROLL_CURRENT, COLOR_ROLL_SELECTED = 9, 10, 11
 
 E_QUIT, E_HISTEDIT = 1, 2
 E_PAGEDOWN, E_PAGEUP, E_LINEUP, E_LINEDOWN, E_RESIZE = 3, 4, 5, 6, 7
@@ -1392,6 +1393,9 @@ def _chisteditmain(repo, rules, stdscr):
     curses.init_pair(COLOR_DIFF_ADD_LINE, curses.COLOR_GREEN, -1)
     curses.init_pair(COLOR_DIFF_DEL_LINE, curses.COLOR_RED, -1)
     curses.init_pair(COLOR_DIFF_OFFSET, curses.COLOR_MAGENTA, -1)
+    curses.init_pair(COLOR_ROLL, curses.COLOR_RED, -1)
+    curses.init_pair(COLOR_ROLL_CURRENT, curses.COLOR_BLACK, 
curses.COLOR_MAGENTA)
+    curses.init_pair(COLOR_ROLL_SELECTED, curses.COLOR_RED, curses.COLOR_WHITE)
 
     # don't display the cursor
     try:
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to