3  fd@s6dZGdddZedkr2ddlmZedddd S) z=Provides "Strip trailing whitespace" under the "Format" menu.c@seZdZddZdddZdS)RstripcCs ||_dS)N)editwin)selfrr3/opt/alt/python36/lib64/python3.6/idlelib/rstrip.py__init__szRstrip.__init__Nc Cs|jj}|jj}|jtt|jd}xZtd|D]L}|jd|d|}t |}t |j }||kr6|j d||fd|q6W|j dS)Nendz%i.0z%i.endz%i.%i) rtextundoZundo_block_startintfloatindexrangegetlenrstripdeleteZundo_block_stop) rZeventr r Zend_lineZcurZtxtrawZcutrrr do_rstrips zRstrip.do_rstrip)N)__name__ __module__ __qualname__rrrrrrrsr__main__)mainzidlelib.idle_test.test_rstrip) verbosityN)__doc__rrZunittestrrrrrs