관리-도구
편집 파일: FormatParagraph.cpython-35.opt-2.pyc
���]w � @ s� d d l Z d d l m Z Gd d � d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z e d k r� d d l Z e j d d d d d �d S)� N)�idleConfc @ sI e Z d Z d d g f g Z d d � Z d d � Z d d d � Z d S)�FormatParagraph�format�Format Paragraph�<<format-paragraph>>c C s | | _ d S)N)�editwin)�selfr � r �4/opt/alt/python35/lib64/python3.5/FormatParagraph.py�__init__ s zFormatParagraph.__init__c C s d | _ d S)N)r )r r r r �close s zFormatParagraph.closeNc C sP | d k r- t j d d d d d d d �} | j j } | j j � \ } } | r{ | r{ | j | | � } t | � } n$ t | | j d � � \ } } } } | r� t | | | � } n t | | � } | j d d d � | | k r/| j d | � | j � | j | | � | j | | � | j � n | j d | � | j d � d S) N� extensionsr z max-width�type�int�default�H �insertZselz1.0�end�break)r Z GetOptionr �textZget_selection_indices�get�get_comment_header�find_paragraph�index�reformat_comment�reformat_paragraphZ tag_removeZmark_setZundo_block_start�deleter Zundo_block_stopZsee) r �event�limitr �first�last�data�comment_header�newdatar r r �format_paragraph_event# s. $ z&FormatParagraph.format_paragraph_event)r r )�__name__� __module__�__qualname__Zmenudefsr r r$ r r r r r s r c C s� t t | j d � � \ } } | j d | d | � } xM | j d | d d � r� t | � r� | d } | j d | d | � } q; W| } t | � } t | � } xQ t | � | k r� t | | d � � r� | d } | j d | d | � } q� Wd | } | d } | j d | d | � } x] | d k r�t | � | k r�t | | d � � r�| d } | j d | d | � } q+Wd | d } | | | | j | | � f S)N�.z%d.0z%d.end�<r � r )�mapr �splitr Zcompare�is_all_whiter �len) r �mark�lineno�col�lineZfirst_linenor"