##// END OF EJS Templates
histedit: notice when the main window underflows height and abort...
Augie Fackler -
r47124:a936e570 default
parent child Browse files
Show More
@@ -1581,10 +1581,19 b' pgup/K: move patch up, pgdn/J: move patc'
1581 def layout(mode):
1581 def layout(mode):
1582 maxy, maxx = stdscr.getmaxyx()
1582 maxy, maxx = stdscr.getmaxyx()
1583 helplen = len(helplines(mode))
1583 helplen = len(helplines(mode))
1584 mainlen = maxy - helplen - 12
1585 if mainlen < 1:
1586 raise error.Abort(
1587 _(b"terminal dimensions %d by %d too small for curses histedit")
1588 % (maxy, maxx),
1589 hint=_(
1590 b"enlarge your terminal or use --config ui.interface=text"
1591 ),
1592 )
1584 return {
1593 return {
1585 b'commit': (12, maxx),
1594 b'commit': (12, maxx),
1586 b'help': (helplen, maxx),
1595 b'help': (helplen, maxx),
1587 b'main': (maxy - helplen - 12, maxx),
1596 b'main': (mainlen, maxx),
1588 }
1597 }
1589
1598
1590 def drawvertwin(size, y, x):
1599 def drawvertwin(size, y, x):
General Comments 0
You need to be logged in to leave comments. Login now