Show More
@@ -1440,6 +1440,17 b' the following are valid keystrokes:' | |||||
1440 | except curses.error: |
|
1440 | except curses.error: | |
1441 | pass |
|
1441 | pass | |
1442 |
|
1442 | |||
|
1443 | def commitMessageWindow(self): | |||
|
1444 | "Create a temporary commit message editing window on the screen." | |||
|
1445 | ||||
|
1446 | curses.raw() | |||
|
1447 | curses.def_prog_mode() | |||
|
1448 | curses.endwin() | |||
|
1449 | self.commenttext = self.ui.edit(self.commenttext, self.ui.username()) | |||
|
1450 | curses.cbreak() | |||
|
1451 | self.stdscr.refresh() | |||
|
1452 | self.stdscr.keypad(1) # allow arrow-keys to continue to function | |||
|
1453 | ||||
1443 | def confirmationwindow(self, windowtext): |
|
1454 | def confirmationwindow(self, windowtext): | |
1444 | "display an informational window, then wait for and return a keypress." |
|
1455 | "display an informational window, then wait for and return a keypress." | |
1445 |
|
1456 | |||
@@ -1661,6 +1672,8 b' are you sure you want to review/edit and' | |||||
1661 | self.togglefolded() |
|
1672 | self.togglefolded() | |
1662 | elif keypressed in ["F"]: |
|
1673 | elif keypressed in ["F"]: | |
1663 | self.togglefolded(foldparent=True) |
|
1674 | self.togglefolded(foldparent=True) | |
|
1675 | elif keypressed in ["m"]: | |||
|
1676 | self.commitMessageWindow() | |||
1664 | elif keypressed in ["?"]: |
|
1677 | elif keypressed in ["?"]: | |
1665 | self.helpwindow() |
|
1678 | self.helpwindow() | |
1666 | self.stdscr.clear() |
|
1679 | self.stdscr.clear() | |
@@ -1736,3 +1749,8 b' are you sure you want to review/edit and' | |||||
1736 | keypressed = "foobar" |
|
1749 | keypressed = "foobar" | |
1737 | if self.handlekeypressed(keypressed): |
|
1750 | if self.handlekeypressed(keypressed): | |
1738 | break |
|
1751 | break | |
|
1752 | ||||
|
1753 | if self.commenttext != "": | |||
|
1754 | whitespaceremoved = re.sub("(?m)^\s.*(\n|$)", "", self.commenttext) | |||
|
1755 | if whitespaceremoved != "": | |||
|
1756 | self.opts['message'] = self.commenttext |
General Comments 0
You need to be logged in to leave comments.
Login now