+
     Bi,                         ^ RI t ^ RIHt ^ RIHtHtHt ^ RIH	t	H
t
 ^ RIHt 0 Rmt] P                  ! R4      3R ltR t ! R	 R
4      t]P%                  4        ]R8X  d   ^ RIHt ]! R^RR7       R# R# )    N)maxsize)FrameTextTclError)NSEWSUNKEN)idleConfz^(\s*)(\w*)c                 @    VP                  V 4      P                  4       # N)matchgroups)codelinecs   &&*/usr/lib/python3.14/idlelib/codecontext.pyget_spaces_firstwordr      s    778##%%    c                     \        V 4      w  r\        V4      p\        V 4      V8X  g   W,          R 8X  d   \        pV\        9   ;'       d    TpW0V3# )#)r   lenINFINITYBLOCKOPENERS)r   spaces	firstwordindentopeners   &    r   get_line_infor      sR     -X6F[F
8}("2c"9,&449FV##r   c                   |   a  ] tR t^-t o ^dtR tR t]R 4       tR t	RR lt
RR ltR tRR	 ltR
 tR tR tRtV tR# )CodeContextc                T    Wn         VP                  V n        V P                  4        R # r   )editwintext_reset)selfr    s   &&r   __init__CodeContext.__init__1   s    " LL	r   c                N    R V n         R V n        R V n        ^V n        R.V n        R # )N)r    F)contextcell00t1
topvisibleinfor#   s   &r   r"   CodeContext._resetF   s(    '(	r   c                F    \         P                  ! R RRR^R7      V n        R# )
extensionsr   maxlinesint)typedefaultN)r	   	GetOptioncontext_depth)clss   &r   reloadCodeContext.reloadM   s#     %..|]/979;r   c                    V P                   e0    V P                  P                  V P                   4       R V n         R # R #   \         d     Li ; ir   )r+   r!   after_cancelr   r.   s   &r   __del__CodeContext.__del__T   sI    77		&&tww/ DG   s   %A   AANc                l   V P                   Ef   V P                  P                  V P                  P                  3p^ p^ pV F  pWPP                  P                  J d   VP	                  4       MVP                  4       pW5P                  P                  VR,          4      ,          pW5P                  P                  VP                  R4      4      ,          pWEP                  P                  VP                  R4      4      ,          pK  	  \        V P                  P                  ^^^ W4\        RR7      ;qpn         V P                  4        V P                  4        VP                  RV P                  4       V P                  4        VP!                  ^ ^\"        R7       \$        P&                  ! \$        P(                  ! 4       R4      p\+        V P                  P                  VR,          R	7      V n        V P,                  P!                  ^ ^ \"        R7       R
p	MyV P                   P/                  4        R V n         V P,                  P/                  4        R V n        V P                  P1                  V P2                  4       V P5                  4        Rp	V P                  P7                  RRV	 R2R7       R# )Npadxborderdisabled)heightwidthhighlightthicknessr@   rA   reliefstatez<ButtonRelease-1>)rowcolumnsticky
linenumber
backgroundbgHideShowoptionsz*ode*ontextz Code Context)menuindexlabelbreak)r)   r    r!   
text_frame	grid_info	pack_infotkgetintcgetr   r   update_fontupdate_highlight_colorsbind
jumptolinetimer_eventgridr   r	   GetHighlightCurrentThemer   r*   destroyr<   r+   r"   update_menu_label)
r#   eventwidgetsr@   rA   widgetr-   r)   line_number_colorsmenu_statuss
   &&        r   toggle_code_context_event%CodeContext.toggle_code_context_event]   s%    << ll'')@)@@GDF!!\\%6%66 ((*#--/  		((f66		((V)<==))**6;;x+@AA " &*''#$z&K KGl ((*LL,doo>LLQqL6!)!6!6x7L7L7N7C"E 7 7+=l+KMDKKK1T: KLL  "DLKK!DKII""477+KKM K&&I]0;}M-J 	' 	Lr   c                ^   . p\         p\        W^,
          R4       F|  pV P                  P                  V R2V R24      p\	        V4      w  rp
W8  g   K;  TpV
R9   d
   V^,          pV
'       d    Wa8  d   W8  d   VP                  WhW34       WS8:  g   K|   M	  VP                  4        WE3# )   .0z.endr'   )elseelif)r   ranger!   getr   appendreverse)r#   new_topvisiblestopline
stopindentlines
lastindentlinenumr   r   r!   r   s   &&&&       r   get_contextCodeContext.get_context   s     
 ^aZ<Gyy}}y^y5EFH#0#: F&"#
--!OJg66;OLL'4!@A+ = 	  r   c                4   V P                   P                  R 4      pV P                  V8X  d   R# V P                  V8  dN   V P                  VV P                  4      w  r#V P                  R	,          ^,          V8  d   V P                  R	 K.  MV P                  R	,          ^,          ^,           pV P                  R	,          ^ ,          V8  d*   V P                  R	,          ^,          pV P                  R	 KH  V P                  VV P                  R	,          ^ ,          ^,           V4      w  r#V P                  P                  V4       Wn        V P                  V P                  ) R  Uu. uF  qU^,          NK  	  ppV^ ,          '       d   ^ M^p\        V4      V,
          V P                  R&   RV P                  R&   V P                  P                  RR4       V P                  P                  RRP                  WgR 4      4       RV P                  R&   R# u upi )
z@0,0NrC   normalrG   z1.0end
rB   r'   )r    	getlinenor,   r|   r-   extendr7   r   r)   deleteinsertjoin)r#   rv   ry   rz   rx   xcontext_strings	showfirsts   &       r   update_code_contextCodeContext.update_code_context   s    //7??n,??^+ $ 0 015!BE ))B-"j0IIbM 1 2q)A-J ))B-"n4!YYr]1-
IIbM $ 0 0152q1A!1C1;!=E 			()-D4F4F3F3G)HI)HAQ44)HI(++A	!$_!5	!AX (WE5)E499_Z-H#IJ *W Js   'Hc                    V P                   P                  R 4       R#   \         d    \        T P                  4      pT^8X  d   ^pMp\        \        T P                   P                  R4      4      4      p\        ^Y P                  ,
          4      ^,
          pT P                  YT,           ,          ^ ,          pT P                  P                  T R24       T P                  4         R# i ; i)z	sel.firstr   ro   N)r)   rS   r   r   r-   r3   floatmaxr7   r!   yviewr   )r#   rf   ry   newtopcontextlineoffsets   &&    r   r_   CodeContext.jumptoline   s    	'LL{+ 	'		NEz "%(:(:8(D"EFQ(:(: :;a?6#78;IIOOvhbM*$$&	's    CC+*C+c                    V P                   eH   V P                  4        V P                  P                  V P                  V P
                  4      V n        R # R # r   )r)   r   r!   afterUPDATEINTERVALr`   r+   r.   s   &r   r`   CodeContext.timer_event   s?    <<#$$&iiood&9&94;K;KLDG $r   c                    V P                   e3   \        P                  ! V P                  RR4      pWP                   R&   R # R # )NmainEditorWindowfont)r)   r	   GetFontr!   )r#   r   s   & r   r\   CodeContext.update_font   s5    <<###DIIv~FD#'LL  $r   c                   V P                   eW   \        P                  ! \        P                  ! 4       R4      pVR,          V P                   R&   VR,          V P                   R&   V P                  eP   \        P                  ! \        P                  ! 4       R4      pV P                  P                  VR,          R7       R # R # )Nr)   rL   
foregroundrK   rM   )r)   r	   rb   rc   r*   config)r#   colorsri   s   &  r   r]   #CodeContext.update_highlight_colors   s    <<#**8+@+@+BINF)/)=DLL&)/)=DLL&;;"!)!6!6x7L7L7N7C"EKK"4\"BC #r   )r*   r)   r    r-   r+   r!   r,   r   )rn   r   )__name__
__module____qualname____firstlineno__r   r$   r"   classmethodr9   r=   rk   r|   r   r_   r`   r\   r]   __static_attributes____classdictcell__)__classdict__s   @r   r   r   -   sZ     N*) ; ;6p!<&+P'*M(
	D 	Dr   r   __main__)r   z"idlelib.idle_test.test_codecontextF)	verbosityexit>   ifdeffortryrq   rp   withasyncclasswhileexceptfinally)resysr   r   tkinterr   r   r   tkinter.constantsr   r   idlelib.configr	   r   compiler   r   r   r9   r   unittestr    r   r   <module>r      st    
 # ) ) * #> &(ZZ%? &
$WD WDt     z	-G r   