
    %
i
                     0    d dl Z d dlZ G d d          ZdS )    Nc                   j    e Zd ZddgiZddgiZddgfgZej        ej        z   dz   Z	d Z
d Zd	 Zd
 ZdS )
AutoExpand<<expand-word>>z<Alt-slash>z<Meta-slash>edit)zE_xpand wordr   _c                 D    |j         | _         d | j         _        d | _        d S )N)textwordliststate)selfeditwins     C:\Users\Dell Inspiron 16\Desktop\tws\AgrotaPowerBi\back-agrota-powerbi\mcp-client-agrota\venv\Lib\site-packages\pythonwin/pywin/idle/AutoExpand.py__init__zAutoExpand.__init__   s     L	!	


    c                    | j                             d          }| j                             dd          }| j        s|                                 }d}n.| j        \  }}}}||k    s||k    r|                                 }d}|s| j                                          dS |                                 }| j                             dt          |          z  d           ||         }	|dz   t          |          z  }|dk    r| j                                          | j         	                    d|	           | j                             d          }| j                             dd          }||||f| _        dS )Ninsertinsert linestartzinsert lineendr   breakzinsert - %d chars   )
r	   indexgetr   getwordsbellgetprevworddeletelenr   )
r   event	curinsertcurlinewordsr   r   linewordnewwords
             r   expand_word_eventzAutoExpand.expand_word_event"   sb   IOOH--	)-- 24DEEz 	MMOOEEE)-&E5&$""dgoo 	INN7!!	,s4yy8(CCC,c%jj(A::INN	7+++IOOH--	)-- 24DEEE9g5
wr   c                 L   |                                  }|sg S | j                            dd          }t          j        d|z   dz   |          }~| j                            dd          }t          j        d|z   dz   |          }~|s|sg S g }i }|                                 |D ]2}|                    |          r|                    |           |||<   3|D ]2}|                    |          r|                    |           |||<   3|                    |           |S )Nz1.0zinsert wordstartz\bz\w+\bzinsert wordendend)r   r	   r   refindallreverseappend)	r   r"   beforewbeforeafterwafterr    dictws	            r   r   zAutoExpand.getwords<   sG   !! 	Iu&899*UT\H4f==	.66EDL83U;; 	v 	I 	 	Axx{{ LLOOODGG 	 	Axx{{ LLOOODGGTr   c                     | j                             dd          }t          |          }|dk    r/||dz
           | j        v r|dz  }|dk    r||dz
           | j        v ||d          S )Nr   r   r   r   )r	   r   r   	wordchars)r   r!   is      r   r   zAutoExpand.getprevwordZ   su    y}}/::II!eeQUt~55FA !eeQUt~55ABBxr   N)__name__
__module____qualname__keydefsunix_keydefsmenudefsstringascii_lettersdigitsr2   r   r$   r   r    r   r   r   r   	   s        M?G
 	N+L 3	
H $v}4s:I  
  4  <    r   r   )r'   r:   r   r=   r   r   <module>r>      sS    				 V V V V V V V V V Vr   