python (3.12.0)

(root)/
lib/
python3.12/
idlelib/
__pycache__/
codecontext.cpython-312.opt-2.pyc

̑e,	ddlZddlmZddlmZmZmZddlm	Z	m
Z
ddlmZhdZ
ejdfdZd	ZGd
dZej%edk(rdd
lmZedddyy)N)maxsize)FrameTextTclError)NSEWSUNKEN)idleConf>ifdeffortryelifelsewithasyncclasswhileexceptfinallyz^(\s*)(\w*)cB	|j|jSN)matchgroups)codelinecs  G/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/idlelib/codecontext.pyget_spaces_firstwordrsD778##%%c	t|\}}t|}t||k(s||dk(rt}|tvxr|}|||fS)N#)rlenINFINITYBLOCKOPENERS)rspaces	firstwordindentopeners     r
get_line_infor(sZ
-X6FI
[F
8}(6"2c"9
,
&
49F8V##rcdeZdZ	dZdZdZedZdZddZ	ddZ
d	Zdd
ZdZ
dZd
Zy)CodeContextdcV	||_|j|_|jyr)editwintext_reset)selfr-s  r__init__zCodeContext.__init__1s$	 LL	
rcLd|_d|_d|_d|_dg|_y)N)rF)contextcell00t1
topvisibleinfor0s rr/zCodeContext._resetFs('(	rcD	tjddddd|_y)N
extensionsr*maxlinesint)typedefault)r		GetOption
context_depth)clss rreloadzCodeContext.reloadMs$+$..|]/979;rc	|j.	|jj|jd|_yy#t$rYwxYwr)r8r.after_cancelrr;s r__del__zCodeContext.__del__TsL"77
		&&tww/DG

s%=	A	A	Nc
@	|j|jj|jjf}d}d}|D]}||jjur|j	n|j}||jj|dz
}||jj|jdz
}||jj|jdz
}t|jjddd||tdx}|_|j|j|jd|j|j|j!ddt"t%j&t%j(d	}t+|jj|d
|_|j,j!ddt"d}	ny|jj/d|_|j,j/d|_|jj1|j2|j5d
}	|jj7dd|	dy)Nrpadxborderr3disabled)heightwidthhighlightthicknessrKrLreliefstatez<ButtonRelease-1>)rowcolumnsticky
linenumber
backgroundbgHideShowoptionsz*ode*ontextz
 Code Context)menuindexlabelbreak)r6r-r.
text_frame	grid_info	pack_infotkgetintcgetrrupdate_fontupdate_highlight_colorsbind
jumptolinetimer_eventgridrr	GetHighlightCurrentThemerr7destroyrHr8r/update_menu_label)
r0eventwidgetsrKrLwidgetr:r6line_number_colorsmenu_statuss
          rtoggle_code_context_eventz%CodeContext.toggle_code_context_event]s=	<<ll'')@)@@GDF!
B!T\\%6%66((*#--/		((f66		((V)<==&))**6;;x+@AA

B&*''#$&z&K
KGdl
((*LL,doo>LLQqL6!)!6!6x7L7L7N7C"E 7 7+=l+KMDKKK1T: KLL  "DLKK!DKII""477+KKM K&&I]0;}M-J	'	Lrc:	g}t}t||dz
dD]l}|jj|d|d}t	|\}}	}
||ks:|}|
dvr|dz
}|
r||kr||k\r|j|||	|
f||ksln|j
||fS)Nr3r4.0z.end)rr)r"ranger.getr(appendreverse)r0new_topvisiblestopline
stopindentlines
lastindentlinenumrr&r.r's           rget_contextzCodeContext.get_contexts	
^XaZ<	Gyy}}y^y5EFH#0#: FD&
"#
--!OJg66Z;OLL'64!@A+		

j  rc	|jjd}|j|k(ry|j|krX|j||j\}}|jdd|k\r|jd=|jdd|k\r#n|jdddz}|jdd|k\r5|jdd}|jd=|jdd|k\r5|j||jdddz|\}}|jj|||_|j|jdDcgc]}|d	}}|drdnd}t||z
|jd<d|jd<|jjd	d
|jjd
dj||dd|jd<ycc}w)
Nz@0,0r4r3rrNnormalrRz1.0end
rM)r-	getlinenor9rr:extendrDr!r6deleteinsertjoin)r0r}rrrxcontext_strings	showfirsts        rupdate_code_contextzCodeContext.update_code_contexts	//7??n,??^+ $ 0 015!BE:))B-"j0IIbM))B-"j02q)A-J))B-"n4!YYr]1-
IIbM))B-"n4!% 0 0152q1A!1C1;!=E:	
		()-D4F4F3F3G)HIA1Q4II(+A	!$_!5	!AX (WE5)E499_YZ-H#IJ *WJsG5c		|jjdy#t$rt|j}|dk(rd}n^tt
|jjd}td||jz
dz
}|j||zd}|jj|d|jYywxYw)Nz	sel.firstr3rrrx)r6r^rr!r:r?floatmaxrDr.yviewr)r0rqrnewtopcontextlineoffsets      rrjzCodeContext.jumptolines	

	'LL{+	'		NEz"%(:(:8(D"EFQ(:(: :;a?6K#78;IIOOvhbM*$$&	'sB2CCc	|jF|j|jj|j|j
|_yyr)r6rr.afterUPDATEINTERVALrkr8r;s rrkzCodeContext.timer_eventsBH<<#$$&iiood&9&94;K;KLDG$rc~|j1tj|jdd}||jd<yy)NmainEditorWindowfont)r6r	GetFontr.)r0rs  rrgzCodeContext.update_fonts7<<###DIIv~FD#'DLL $rc\|jLtjtjd}|d|jd<|d|jd<|jHtjtjd}|jj|dyy)Nr6rW
foregroundrVrX)r6r	rmrnr7config)r0colorsrts   rrhz#CodeContext.update_highlight_colorss<<#**8+@+@+BINF)/)=DLL&)/)=DLL&;;"!)!6!6x7L7L7N7C"EKK"4\"BC#rr)r3r)__name__
__module____qualname__rr1r/classmethodrFrIrvrrrjrkrgrhrrr*r*-sT2N*);;6p!<&+P'*M(
	Drr*__main__)rz"idlelib.idle_test.test_codecontextrF)	verbosityexit)resysrr"tkinterrrrtkinter.constantsrridlelib.configr	r#compilerr(r*rFrunittestrrrr<module>rs{
#))*#>&0RZZ%?&
$WDWDtz	-Gr