%PDF- %PDF-
| Direktori : /lib/python3/dist-packages/orca/scripts/terminal/__pycache__/ |
| Current File : //lib/python3/dist-packages/orca/scripts/terminal/__pycache__/script_utilities.cpython-312.pyc |
�
g
fR � � � d Z dZdZdZdZddlZddlmZ ddlmZ dd lm Z dd
lm
Z
ddlmZ ddlm
Z
dd
lmZ G d� de
j � Zy)z$Id$z
$Revision$z$Date$zCopyright (c) 2016 Igalia, S.L.�LGPL� N)�debug)�
focus_manager)�keybindings)�script_utilities)�settings_manager)�AXText)�AXUtilitiesc �n � � e Zd Z� fd�Zd� Zd� Zd� Zd� Z� fd�Z� fd�Z d� Z
d � Zd
� Zd� Z
d� Zd
� Z� xZS )� Utilitiesc �$ �� t �| � |� y �N)�super�__init__)�self�script� __class__s ��H/usr/lib/python3/dist-packages/orca/scripts/terminal/script_utilities.pyr zUtilities.__init__( s �� �
���� � c � � y r � )r s r �
clearCachezUtilities.clearCache+ s � �r c �� � t j d|j � }|s|j S |j d |j � }d|dg}t j
t j |d� |S )N�
~zTERMINAL: Adjusted deletion: '�'T)�re�search�any_data�startr �printTokens�
LEVEL_INFO)r �event�match�adjusted�tokenss r �deletedTextzUtilities.deletedText. sb � �� � �%����0����>�>�!��>�>�.�5�;�;�=�1��2�H�c�B��
���%�*�*�F�D�9��r c � � t |j � dk( r|j S | j |� r|j S | j |� r|j S |j |j t |j � z }}t j |j |� }d|g}t j t j |d� t j |j |dz
� }d|g}t j t j |d� ||k( r3d}t j t j |d� |j S t j |j d � }d|g}t j t j |d� |dk7 r|d }|d||fvr|}|dk7 r|d }|d j d
� r|dz }t j |j ||� } | r,d| dg}t j t j |d� | S d
}t j t j |d� |j } | S )N� z"TERMINAL: First line of insertion:Tz!TERMINAL: Last line of insertion:z.TERMINAL: Not adjusting single-line insertion.zTERMINAL: Current line:)� r r � r �
zTERMINAL: Adjusted insertion: 'r z0TERMINAL: Adjustment failed. Returning any_data.)�lenr �isAutoTextEvent�isClipboardTextChangedEvent�detail1r �get_line_at_offset�sourcer r r! �printMessage�endswith�
get_substring)
r r"