î Òê[ã@sQdZGdd„dƒZedkrMddlZejdddd d ƒndS) z=Provides "Strip trailing whitespace" under the "Format" menu.c@s@eZdZddd gfgZdd„Zddd„ZdS) ÚRstripExtensionÚformatNúStrip trailing whitespaceú <>cCs&||_|jjjd|jƒdS)Nz <>)ÚeditwinÚtextZbindÚ do_rstrip)Úselfr©r ú-/usr/lib/python3.4/idlelib/RstripExtension.pyÚ__init__s zRstripExtension.__init__c CsÊ|jj}|jj}|jƒtt|jdƒƒƒ}x|td|ƒD]k}|jd|d|ƒ}t |ƒ}t |j ƒƒ}||krM|j d||fd|ƒqMqMW|j ƒdS)NÚendéz%i.0z%i.endz%i.%i) rrÚundoZundo_block_startÚintÚfloatÚindexÚrangeÚgetÚlenÚrstripZdeleteZundo_block_stop) rZeventrrZend_lineZcurZtxtÚrawZcutr r r r s     %zRstripExtension.do_rstrip)rr)Ú__name__Ú __module__Ú __qualname__Zmenudefsr rr r r r rs  rÚ__main__éNzidlelib.idle_test.test_rstripÚ verbosityéÚexitF)Ú__doc__rrZunittestÚmainr r r r Ús