File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1208,3 +1208,16 @@ def apply(self, ui):
12081208 message_tree .next_contenttype ()
12091209 message_tree .reassemble ()
12101210 tbuffer .refresh ()
1211+
1212+ @registerCommand (MODE , 'prevctype' , help = 'display the previous contenttype' )
1213+ class PrevCTypeCommand (Command ):
1214+
1215+ """display the next contenttype"""
1216+ repeatable = True
1217+
1218+ def apply (self , ui ):
1219+ tbuffer = ui .current_buffer
1220+ message_tree = tbuffer .get_selected_messagetree ()
1221+ message_tree .prev_contenttype ()
1222+ message_tree .reassemble ()
1223+ tbuffer .refresh ()
Original file line number Diff line number Diff line change @@ -290,6 +290,10 @@ def next_contenttype(self):
290290 self ._current_contenttype += 1
291291 self ._current_contenttype %= len (self ._get_content_parts ())
292292
293+ def prev_contenttype (self ):
294+ self ._current_contenttype -= 1
295+ self ._current_contenttype %= len (self ._get_content_parts ())
296+
293297 def _get_headers (self ):
294298 if self .display_all_headers is True :
295299 if self ._all_headers_tree is None :
You can’t perform that action at this time.
0 commit comments