Mercurial > hg
comparison hgext/histedit.py @ 43663:1d29da62af76
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.
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Wed, 30 Oct 2019 19:34:57 -0400 |
parents | 4323a32c7afe |
children | bde66eb4051d |
comparison
equal
deleted
inserted
replaced
43662:4323a32c7afe | 43663:1d29da62af76 |
---|---|
1054 b'roll': b'^roll', | 1054 b'roll': b'^roll', |
1055 } | 1055 } |
1056 | 1056 |
1057 COLOR_HELP, COLOR_SELECTED, COLOR_OK, COLOR_WARN, COLOR_CURRENT = 1, 2, 3, 4, 5 | 1057 COLOR_HELP, COLOR_SELECTED, COLOR_OK, COLOR_WARN, COLOR_CURRENT = 1, 2, 3, 4, 5 |
1058 COLOR_DIFF_ADD_LINE, COLOR_DIFF_DEL_LINE, COLOR_DIFF_OFFSET = 6, 7, 8 | 1058 COLOR_DIFF_ADD_LINE, COLOR_DIFF_DEL_LINE, COLOR_DIFF_OFFSET = 6, 7, 8 |
1059 COLOR_ROLL, COLOR_ROLL_CURRENT, COLOR_ROLL_SELECTED = 9, 10, 11 | |
1059 | 1060 |
1060 E_QUIT, E_HISTEDIT = 1, 2 | 1061 E_QUIT, E_HISTEDIT = 1, 2 |
1061 E_PAGEDOWN, E_PAGEUP, E_LINEUP, E_LINEDOWN, E_RESIZE = 3, 4, 5, 6, 7 | 1062 E_PAGEDOWN, E_PAGEUP, E_LINEUP, E_LINEDOWN, E_RESIZE = 3, 4, 5, 6, 7 |
1062 MODE_INIT, MODE_PATCH, MODE_RULES, MODE_HELP = 0, 1, 2, 3 | 1063 MODE_INIT, MODE_PATCH, MODE_RULES, MODE_HELP = 0, 1, 2, 3 |
1063 | 1064 |
1390 curses.init_pair(COLOR_OK, curses.COLOR_BLACK, curses.COLOR_GREEN) | 1391 curses.init_pair(COLOR_OK, curses.COLOR_BLACK, curses.COLOR_GREEN) |
1391 curses.init_pair(COLOR_CURRENT, curses.COLOR_WHITE, curses.COLOR_MAGENTA) | 1392 curses.init_pair(COLOR_CURRENT, curses.COLOR_WHITE, curses.COLOR_MAGENTA) |
1392 curses.init_pair(COLOR_DIFF_ADD_LINE, curses.COLOR_GREEN, -1) | 1393 curses.init_pair(COLOR_DIFF_ADD_LINE, curses.COLOR_GREEN, -1) |
1393 curses.init_pair(COLOR_DIFF_DEL_LINE, curses.COLOR_RED, -1) | 1394 curses.init_pair(COLOR_DIFF_DEL_LINE, curses.COLOR_RED, -1) |
1394 curses.init_pair(COLOR_DIFF_OFFSET, curses.COLOR_MAGENTA, -1) | 1395 curses.init_pair(COLOR_DIFF_OFFSET, curses.COLOR_MAGENTA, -1) |
1396 curses.init_pair(COLOR_ROLL, curses.COLOR_RED, -1) | |
1397 curses.init_pair( | |
1398 COLOR_ROLL_CURRENT, curses.COLOR_BLACK, curses.COLOR_MAGENTA | |
1399 ) | |
1400 curses.init_pair(COLOR_ROLL_SELECTED, curses.COLOR_RED, curses.COLOR_WHITE) | |
1395 | 1401 |
1396 # don't display the cursor | 1402 # don't display the cursor |
1397 try: | 1403 try: |
1398 curses.curs_set(0) | 1404 curses.curs_set(0) |
1399 except curses.error: | 1405 except curses.error: |