a
    ze                     @   sZ   d dl mZ d dlmZ dd ZG dd dZe  edkrVd dlZej	d	d
dd dS )    )idleConfwrapsc                    s   t  d fdd	}|S )Nc                    sT   | j  \}}}}tt|d D ]}|| } | |||< q"| j |||| dS )N   break)	formatterZ
get_regionrangelenZ
set_region)selfeventheadtailcharslinesposlineformat_line %/usr/lib/python3.9/idlelib/zzdummy.pyapply   s    zformat_selection.<locals>.apply)Nr   )r   r   r   r   r   format_selection   s    r   c                   @   sF   e Zd ZdddgfgZdd Zedd Zedd	 Zed
d Z	dS )ZzDummyformat)zZ inz<<z-in>>)zZ outz	<<z-out>>c                 C   s   || _ |j| _|j| _d S N)editwintextZfregionr   )r
   r   r   r   r   __init__%   s    zZzDummy.__init__c                 C   s   t ddd| _d S )N
extensionsr   zz-text)r   Z	GetOptionztext)clsr   r   r   reload+   s    zZzDummy.reloadc                 C   s   | j  | S r   )r   )r
   r   r   r   r   
z_in_event0   s    zZzDummy.z_in_eventc                 C   s&   | | jsdnt| j}||d  S )Nr   )
startswithr   r	   )r
   r   Zzlengthr   r   r   z_out_event9   s    zZzDummy.z_out_eventN)
__name__
__module____qualname__Zmenudefsr   classmethodr!   r   r"   r$   r   r   r   r   r      s   

r   __main__Nzidlelib.idle_test.test_zzdummy   F)	verbosityexit)
Zidlelib.configr   	functoolsr   r   r   r!   r%   Zunittestmainr   r   r   r   <module>   s   *