Show More
@@ -946,15 +946,39 b' class curseschunkselector(object):' | |||
|
946 | 946 | self.linesprintedtopadsofar += linesprinted |
|
947 | 947 | return t |
|
948 | 948 | |
|
949 | def _getstatuslinesegments(self): | |
|
950 | """-> [str]. return segments""" | |
|
951 | segments = [ | |
|
952 | _('Select hunks to record'), | |
|
953 | '-', | |
|
954 | _('[x]=selected **=collapsed'), | |
|
955 | _('c: confirm'), | |
|
956 | _('q: abort'), | |
|
957 | _('arrow keys: move/expand/collapse'), | |
|
958 | _('space: select'), | |
|
959 | _('?: help'), | |
|
960 | ] | |
|
961 | return segments | |
|
962 | ||
|
949 | 963 | def _getstatuslines(self): |
|
950 | 964 | """() -> [str]. return short help used in the top status window""" |
|
951 | 965 | if self.errorstr is not None: |
|
952 | 966 | lines = [self.errorstr, _('Press any key to continue')] |
|
953 | 967 | else: |
|
954 | lines = [_("SELECT CHUNKS: (j/k/up/dn/pgup/pgdn) move cursor; " | |
|
955 | "(space/A) toggle hunk/all; (e)dit hunk;"), | |
|
956 | _(" (f)old/unfold; (c)onfirm applied; (q)uit; (?) help " | |
|
957 | "| [X]=hunk applied **=folded, toggle [a]mend mode")] | |
|
968 | # wrap segments to lines | |
|
969 | segments = self._getstatuslinesegments() | |
|
970 | width = self.xscreensize | |
|
971 | lines = [] | |
|
972 | lastwidth = width | |
|
973 | for s in segments: | |
|
974 | w = encoding.colwidth(s) | |
|
975 | sep = ' ' * (1 + (s and s[0] not in '-[')) | |
|
976 | if lastwidth + w + len(sep) >= width: | |
|
977 | lines.append(s) | |
|
978 | lastwidth = w | |
|
979 | else: | |
|
980 | lines[-1] += sep + s | |
|
981 | lastwidth += w + len(sep) | |
|
958 | 982 | if len(lines) != self.numstatuslines: |
|
959 | 983 | self.numstatuslines = len(lines) |
|
960 | 984 | self.statuswin.resize(self.numstatuslines, self.xscreensize) |
General Comments 0
You need to be logged in to leave comments.
Login now