Current File : //usr/local/apps/python3/lib/python3.11/idlelib/__pycache__/autoexpand.cpython-311.opt-2.pyc |
�
�Ke� � �h � d dl Z d dlZ G d� d� � Zedk rd dlmZ edd�� � dS dS ) � Nc �J � e Zd Zej ej z dz Zd� Zd� Zd� Z d� Z
dS )�
AutoExpand�_c �N � |j | _ | j j | _ d | _ d S )N)�text�bell�state)�self�editwins �</usr/local/apps/python3/lib/python3.11/idlelib/autoexpand.py�__init__zAutoExpand.__init__ s! � ��L�� ��I�N�� ���
�
�
� c �� � | j � d� � }| j � dd� � }| j s| � � � }d}n.| j \ }}}}||k s||k r| � � � }d}|s| � � � dS | � � � }| j � dt |� � z d� � || } |dz t |� � z }|dk r| � � � | j � d| � � | j � d� � }| j � dd� � }||||f| _ dS )N�insert�insert linestartzinsert lineendr �breakzinsert - %d chars� )
r �index�getr �getwordsr �getprevword�delete�lenr )
r
�event� curinsert�curline�wordsr r �line�word�newwords
r �expand_word_eventzAutoExpand.expand_word_event s[ � �;��I�O�O�H�-�-� ��)�-�-� 2�4D�E�E���z� ��M�M�O�O�E��E�E�)-��&�E�5�&�$���"�"�d�g�o�o��
�
������� ��I�I�K�K�K��7����!�!��� ���,�s�4�y�y�8�(�C�C�C���,�����c�%�j�j�(���A�:�:��I�I�K�K�K�� ����7�+�+�+��I�O�O�H�-�-� ��)�-�-� 2�4D�E�E���E�9�g�5��
��wr c �N � | � � � }|sg S | j � dd� � }t j d|z dz |� � }~| j � dd� � }t j d|z dz |� � }~|s|sg S g }i }|� � � |D ]2}|� |� � r�|� |� � |||<