Files
ServerSync/lib/prompt_toolkit/__pycache__/search.cpython-314.pyc

83 lines
8.7 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
9<><39>i'<00><01><00>Rt^RIHt^RIHt^RIHt^RIHt^RI H
t
H t H t ^RI Ht]'d^RIHtHt^RIHt.ROt!R
R ]4t!R R 4tR ]P.3RRlltRRRlltRRRlltRRltRRltR #)z<>
Search operations.
For the key bindings implementation with attached filters, check
`prompt_toolkit.key_binding.bindings.search`. (Use these for new key bindings
instead of calling these function directly.)
)<01> annotations)<01>Enum)<01> TYPE_CHECKING)<01>get_app)<03> FilterOrBool<6F> is_searching<6E> to_filter)<01> InputMode)<02> BufferControl<6F>SearchBufferControl)<01>Layout<75>SearchDirectionc<01><00>]tRt^tRtRtRtR#)r <00>FORWARD<52>BACKWARD<52>N)<07>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__rr<00>__static_attributes__r<00><00></tmp/pip-target-wqrk2shd/lib/python/prompt_toolkit/search.pyr r s <00><00><17>G<EFBFBD><19>Hrc<01>`<00>]tRt^"tRtR tR]PR3RRlltRRlt RR lt
R
t R #) <0A> SearchStateaK
A search 'query', associated with a search field (like a SearchToolbar).
Every searchable `BufferControl` points to a `search_buffer_control`
(another `BufferControls`) which represents the search field. The
`SearchState` attached to that search field is used for storing the current
search query.
It is possible to have one searchfield for multiple `BufferControls`. In
that case, they'll share the same `SearchState`.
If there are multiple `BufferControls` that display the same `Buffer`, then
they can have a different `SearchState` each (if they have a different
search control).
<EFBFBD>Fc<01>(<00>V^8<>dQhRRRRRRRR/#) <09><00>text<78>str<74> directionr <00> ignore_caser<00>return<72>Noner)<01>formats"r<00> __annotate__<5F>SearchState.__annotate__4s2<00><00>2<>2<><11>2<>#<23>2<>"<22> 2<>
<0E> 2rc <09>><00>WnW n\V4VnR#<00>N)rr rr!)<04>selfrr r!s&&&&r<00>__init__<5F>SearchState.__init__4s<00><00> <19> <09>"<22><0E>$<24>[<5B>1<><04>rc<01><00>V^8<>dQhRR/#)rr"rr)r$s"rr%r&>s<00><00>{<01>{<01>#<23>{rc <09><><00>VPP RVP: RVP: RVP: R2#)<04>(z , direction=z, ignore_case=<3D>))<05> __class__rrr r!)r)s&r<00>__repr__<5F>SearchState.__repr__>s?<00><00><16>.<2E>.<2E>)<29>)<29>*<2A>!<21>D<EFBFBD>I<EFBFBD>I<EFBFBD>=<3D> <0C>T<EFBFBD>^<5E>^<5E>DV<44>Vd<56>ei<65>eu<65>eu<65>dx<64>xy<78>z<>zrc<01><00>V^8<>dQhRR/#)rr"rr)r$s"rr%r&As<00><00> 
<EFBFBD> 
<EFBFBD>K<EFBFBD> 
rc <0A><><00>VP\P8Xd\PpM\Pp\ VP
WP R7#)zU
Create a new SearchState where backwards becomes forwards and the other
way around.
<EFBFBD>rr r!)r r rrrrr!)r)r s& r<00>
__invert__<EFBFBD>SearchState.__invert__AsH<00><00>
<10>><3E>><3E>_<EFBFBD>5<>5<> 5<>'<27>/<2F>/<2F>I<EFBFBD>'<27>0<>0<>I<EFBFBD><1A><15><19><19>i<EFBFBD>=M<>=M<>
<EFBFBD>
r)r r!rNr5) rrrr<00>__doc__<5F> __slots__r rr*r1r6rrrrrr"s4<00><00> <08>5<>I<EFBFBD><17>%4<>%<<3C>%<<3C>$)<29> 2<>{<01> 
<EFBFBD> 
rrNc<01>$<00>V^8<>dQhRRRRRR/#)r<00>buffer_control<6F>BufferControl | Noner r r"r#r)r$s"rr%r%Ps&<00><00>$9<>$9<>(<28>$9<><1E>$9<>
<EFBFBD>$9rc<05><><00>^RIHpVe\W4'gQh\4PpVf+\VP
V4'gR#VP
pVP pV'dYWPnVPV4WPV&\P\4PnR#R#)z<>
Start search through the given `buffer_control` using the
`search_buffer_control`.
:param buffer_control: Start search for this `BufferControl`. If not given,
search through the current control.
<EFBFBD>r
N)<0F>prompt_toolkit.layout.controlsr
<00>
isinstancer<00>layout<75>current_control<6F>search_buffer_control<6F> search_stater <00>focus<75> search_linksr <00>INSERT<52>vi_state<74>
input_mode)r;r r
rArCs&& r<00> start_searchrJPs<><00><00>=<3D> <19> !<21>Z<EFBFBD><0E>%N<>%N<>N<> N<> <14>Y<EFBFBD> <1D> <1D>F<EFBFBD><16><1D><19>&<26>0<>0<>-<2D>@<40>@<40> <12><1F>/<2F>/<2F><0E>+<2B>@<40>@<40><19><1C>09<30>#<23>#<23>-<2D> <0F> <0C> <0C>*<2A>+<2B>6D<01><1B><1B>1<>2<>)2<>(8<>(8<><07> <09><1A><1A>%<25>rc<01> <00>V^8<>dQhRRRR/#)rr;r<r"r#r)r$s"rr%r%ws<00><00>9<>9<> 4<>9<><04>9rc<05><><00>\4PpVf VPpVfR#VPpM2WPP 49gQh\ V4V,pVPV4Ve(VPVVPP4\P\4Pn R#)z1
Stop search through the given `buffer_control`.
N)rrA<00>search_target_buffer_controlrCrF<00>values<65>_get_reverse_search_linksrE<00>buffer<65>resetr <00>
NAVIGATIONrHrI)r;rArCs& r<00> stop_searchrSws<><00><00><15>Y<EFBFBD> <1D> <1D>F<EFBFBD><15><1D><1F><<3C><<3C><0E> <19> !<21> <13> .<2E> D<> D<><1D><1D>!4<>!4<>!;<3B>!;<3B>!=<3D>=<3D>=<3D>=<3D> 9<>&<26> A<>.<2E> Q<><1D> <0B>L<EFBFBD>L<EFBFBD><1E> <20><1C>(<28> <12> <1F> <1F> 5<> 6<> <1E>$<24>$<24>*<2A>*<2A>,<2C>%.<2E>$8<>$8<>G<EFBFBD>I<EFBFBD><16><16>!rc<01>$<00>V^8<>dQhRRRRRR/#)rr r <00>count<6E>intr"r#r)r$s"rr%r%<00>s!<00><00>
<EFBFBD>
<EFBFBD>_<EFBFBD>
<EFBFBD>S<EFBFBD>
<EFBFBD><14>
rc<05><><00>\4'gQh\4Pp^RIHpVP
p\ WC4'gR#VPpVfR#VPpVPV8gpVPPVn Wn V'g!VPPVRVR7R#R#)z/
Apply search, but keep search buffer focused.
r>NF)<02>include_current_positionrU) rrrAr?r
rBr@rMrDr rPr<00> apply_search)r rUrAr
<00>search_control<6F> prev_controlrD<00>direction_changeds&& r<00>do_incremental_searchr]<00>s<><00><00> <18>><3E>><3E><19>><3E> <14>Y<EFBFBD> <1D> <1D>F<EFBFBD>=<3D><1B>+<2B>+<2B>N<EFBFBD> <15>n<EFBFBD> 4<> 4<><0E><19>6<>6<>L<EFBFBD><13><1B><0E><1F>,<2C>,<2C>L<EFBFBD>%<25>.<2E>.<2E>)<29>;<3B><15>&<26>-<2D>-<2D>2<>2<>L<EFBFBD><15>&<26><1A> <1D><14><1B><1B>(<28>(<28> <18>5<EFBFBD><05> )<29>
<EFBFBD> rc<01><00>V^8<>dQhRR/#)rr"r#r)r$s"rr%r%<00>s<00><00>'<27>'<27>t<EFBFBD>'rc<05><><00>\4PpVPpVPp^RIHp\ W4'gR#VfR#VPpVPP'dVPPVn VPPVRR7VPP4\V4R#)zD
Accept current search query. Focus original `BufferControl` again.
r>NT)rX) rrArBrMr?r
r@rDrPrrY<00>append_to_historyrS)rArZ<00>target_buffer_controlr
rDs r<00> accept_searchrb<00>s<><00><00><15>Y<EFBFBD> <1D> <1D>F<EFBFBD><1B>+<2B>+<2B>N<EFBFBD>"<22>?<3F>?<3F><19><<3C> <15>n<EFBFBD> 4<> 4<><0E><1C>$<24><0E>(<28>5<>5<>L<EFBFBD><16><1C><1C>!<21>!<21>!<21>*<2A>1<>1<>6<>6<> <0C><19><1A> <20> <20>-<2D>-<2D><14>t<EFBFBD>.<2E><06>
<13><19><19>+<2B>+<2B>-<2D><10>%<25>&rc<01> <00>V^8<>dQhRRRR/#)rrAr r"z(dict[BufferControl, SearchBufferControl]r)r$s"rr%r%<00>s<00><00> <06> <06> <12> <06>-<2D> rc<05>j<00>VPP4UUu/uFwrW!bK upp#uuppi)z;
Return mapping from BufferControl to SearchBufferControl.
)rF<00>items)rArCr;s& rrOrO<00>s?<00><00>6<<3C>5H<35>5H<35>5N<35>5N<35>5P<35> <06>5P<35> 1<> !<21> <17>-<2D>5P<35> <06><06><> s<00> /)r rJrSr()<01>)r8<00>
__future__r<00>enumr<00>typingr<00>application.currentr<00>filtersrrr<00>key_binding.vi_stater r?r
r <00>prompt_toolkit.layout.layoutr <00>__all__r rrrJrSr]rbrOrrr<00><module>rosr<00><01><04>#<23><15> <20>(<28>:<3A>:<3A>+<2B><10>Q<>3<> <02><07><1A>d<EFBFBD><1A>
+
<EFBFBD>+
<EFBFBD>^,0<>!0<>!8<>!8<>$9<>N9<>>
<EFBFBD>B'<27>D r