MINI MINI MANI MO
ó
Eì]c           @   s`   d  d l  Z  d  d l m Z d d
 d „  ƒ  YZ d „  Z d „  Z d „  Z d „  Z d	 „  Z d S(   iÿÿÿÿN(   t   idleConft   FormatParagraphc           B   s5   e  Z d  d g f g Z d „  Z d „  Z d „  Z RS(   t   formats   Format Paragraphs   <<format-paragraph>>c         C   s
   | |  _  d  S(   N(   t   editwin(   t   selfR   (    (    s/   /usr/lib64/python2.7/idlelib/FormatParagraph.pyt   __init__   s    c         C   s
   d  |  _ d  S(   N(   t   NoneR   (   R   (    (    s/   /usr/lib64/python2.7/idlelib/FormatParagraph.pyt   close   s    c   
      C   sç  t  t j d d d d d ƒƒ } |  j j } |  j j ƒ  \ } } | ri | ri | j | | ƒ } d } n$ t | | j d ƒ ƒ \ } } } } | rQ| j	 d ƒ } t
 t | ƒ d	 „ | ƒ } d j | ƒ } t
 | t | ƒ d
 ƒ }	 t | |	 ƒ }
 |
 j	 d ƒ }
 d } |
 d s&d } |
 d  }
 n  | d „ } d j t
 | |
 ƒ ƒ | }
 n t | | ƒ }
 | j d
 d d ƒ |
 | k rÆ| j d | ƒ | j ƒ  | j | | ƒ | j | |
 ƒ | j ƒ  n | j d | ƒ | j d ƒ d S(   Nt   mainR   t	   paragrapht   typet   intt    t   inserts   
c         S   s   |  | S(   N(    (   t   stt   l(    (    s/   /usr/lib64/python2.7/idlelib/FormatParagraph.pyt   <lambda>0   s    i   iÿÿÿÿc         S   s   | |  S(   N(    (   t   itemt   prefix(    (    s/   /usr/lib64/python2.7/idlelib/FormatParagraph.pyR   @   s    t   sels   1.0t   endt   break(   R   R    t	   GetOptionR   t   textt   get_selection_indicest   gett   find_paragrapht   indext   splitt   mapt   lent   joint   maxt   reformat_paragrapht
   tag_removet   mark_sett   undo_block_startt   deleteR
   t   undo_block_stopt   see(
   R   t   eventt   maxformatwidthR   t   firstt   lastt   datat   comment_headert   linest   format_widtht   newdatat   block_suffixt   builder(    (    s/   /usr/lib64/python2.7/idlelib/FormatParagraph.pyt   format_paragraph_event"