pkulchenko / ZeroBraneStudio

Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and other Lua interpreters on Windows, macOS, and Linux
http://studio.zerobrane.com/
Other
2.62k stars 516 forks source link

Search - Find in files. wxLua Runtime Error when specify file path #1162

Closed robertlzj closed 1 year ago

robertlzj commented 1 year ago

Hi, When:

  1. specify file path (not folder path),
  2. search something
  3. prompt error:

    wxLua Runtime Error

    Lua: Error while running chunk src/editor/findreplace.lua:147: assertion failed! stack traceback: [C]: in function 'assert' src/editor/findreplace.lua:147: in function 'GetScope' src/editor/findreplace.lua:689: in function 'RunInFiles' src/editor/findreplace.lua:982: in function <src/editor/findreplace.lua:979> [C]: at 0x029c9894 src/main.lua:893: in main chunk

    [C]: in function 'xpcall'
    [string "Initializer"]:1: in main chunk

Expect to search in current file, and show results with content, and multiple result windows like "Find in Files".

pkulchenko commented 1 year ago

@robertlzj, what version of the IDE are you using? I can't reproduce this error and I can't figure out what might have contributed to it. Can you provide more detailed instructions on what you're doing? Are you specifying the file name instead of the file folder in the find-in-files dialog?

Can you try on the current version (1.90) or the current master branch?

pkulchenko commented 1 year ago

I still can't reproduce this issue and suspect it may be fixed already. BTW, you can search in one file if you specify the file name instead of a mask; for example, use foobar.lua instead of *.lua in the search directory panel.