kvichans / cuda_find_in_files4

CudaText plugin to find in multiple files
4 stars 3 forks source link

Error when trying to open search #68

Closed thatfuckingbird closed 2 years ago

thatfuckingbird commented 2 years ago

CudaText Qt5 on Linux, version 1.155.3.0. Installed FiF4 from the addon manager. When i try to open the find window, I get the following error:

Init: cuda_find_in_files4
Traceback (most recent call last):
  File "/home/user/.config/cudatext/py/cuda_find_in_files4/cd_fif4.py", line 355, in show_dlg_and_find_in_tab
    def show_dlg_and_find_in_tab(self): return show_fif4(d(work='in_tab'))
  File "/home/user/.config/cudatext/py/cuda_find_in_files4/cd_fif4.py", line 398, in show_fif4
    the_fif4    = the_fif4 if the_fif4 else Fif4D(run_opts)
  File "/home/user/.config/cudatext/py/cuda_find_in_files4/cd_fif4.py", line 699, in __init__
    m.init_layout()
  File "/home/user/.config/cudatext/py/cuda_find_in_files4/cd_fif4.py", line 1856, in init_layout
    ),rp_cntx=d(tp='chbt' ,tid='di_menu'  ,x=cntx_x       ,w=CTXW     ,cap=m.cntx_ca(),hint=cntx_hi               ,p='pt'                 # &-
  File "/home/user/.config/cudatext/py/cuda_find_in_files4/cd_fif4.py", line 526, in <lambda>
    cntx_ca     = lambda self: cut_amp(Fif4D.CNTX_CA(self.opts))
  File "/home/user/.config/cudatext/py/cuda_find_in_files4/cd_fif4.py", line 439, in <lambda>
    if 'win'!=DESKTOP and re.search(r'&\W') else \
TypeError: search() missing 1 required positional argument: 'string'
ERROR: Exception in CudaText for show_dlg_and_find_in_tab: TypeError: search() missing 1 required positional argument: 'string'
Alexey-T commented 2 years ago

same here. linux x64.

ff4

Alexey-T commented 2 years ago

@kvichans replace line 439 with

cut_amp     = lambda cap: cap.replace('&', '') \
                            if 'win'!=DESKTOP and re.search(r'&\W', cap) else \
                          cap
kvichans commented 2 years ago

Сори!

Alexey-T commented 2 years ago

solved now. plugin updated.

thatfuckingbird commented 2 years ago

I can confirm it works now. Thank you!

Alexey-T commented 2 years ago

@kvichans pls, update code in GH too.

kvichans commented 2 years ago

ok