Mercurial > hg
comparison hgext/histedit.py @ 46394:8477c91b5e8e
histedit: don't assign to _ for unused values
I don't know what this ignored value is, but we need to not clobber
the _() function from gettext, or we get mysterious crashes instead of
internationalizing some strings in my upcoming patches.
Differential Revision: https://phab.mercurial-scm.org/D9853
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 22 Jan 2021 15:29:12 -0500 |
parents | 59fa3890d40a |
children | a936e570288d |
comparison
equal
deleted
inserted
replaced
46393:66e8e279133b | 46394:8477c91b5e8e |
---|---|
1613 ch = None | 1613 ch = None |
1614 stdscr.clear() | 1614 stdscr.clear() |
1615 stdscr.refresh() | 1615 stdscr.refresh() |
1616 while True: | 1616 while True: |
1617 try: | 1617 try: |
1618 oldmode, _ = state[b'mode'] | 1618 oldmode, unused = state[b'mode'] |
1619 if oldmode == MODE_INIT: | 1619 if oldmode == MODE_INIT: |
1620 changemode(state, MODE_RULES) | 1620 changemode(state, MODE_RULES) |
1621 e = event(state, ch) | 1621 e = event(state, ch) |
1622 | 1622 |
1623 if e == E_QUIT: | 1623 if e == E_QUIT: |
1628 if e == E_RESIZE: | 1628 if e == E_RESIZE: |
1629 size = screen_size() | 1629 size = screen_size() |
1630 if size != stdscr.getmaxyx(): | 1630 if size != stdscr.getmaxyx(): |
1631 curses.resizeterm(*size) | 1631 curses.resizeterm(*size) |
1632 | 1632 |
1633 curmode, _ = state[b'mode'] | 1633 curmode, unused = state[b'mode'] |
1634 sizes = layout(curmode) | 1634 sizes = layout(curmode) |
1635 if curmode != oldmode: | 1635 if curmode != oldmode: |
1636 state[b'page_height'] = sizes[b'main'][0] | 1636 state[b'page_height'] = sizes[b'main'][0] |
1637 # Adjust the view to fit the current screen size. | 1637 # Adjust the view to fit the current screen size. |
1638 movecursor(state, state[b'pos'], state[b'pos']) | 1638 movecursor(state, state[b'pos'], state[b'pos']) |