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.6k stars 519 forks source link

Error on find with no active window #1107

Closed qgenesist closed 3 years ago

qgenesist commented 3 years ago

zbERR if find in THIS file is done, and I close that file (not having an active editor file). and then start deleting letters from the find box this error occurs.

find in files works correctly in the same circumstance.

an additional question, why won't ZBS load, work with, and save lua scripts that begin with a $ ?

pkulchenko commented 3 years ago

@qgenesist, thank you for the report; should be fixed now.

why won't ZBS load, work with, and save lua scripts that begin with a $ ?

This is a tricky one; for some reason, the normalization function removes a slash before $ (at least on Windows). You can try the following in the Console:

path = wx.wxFileName("foo/$bar"); path:Normalize(); return path:GetFullPath()

No matter what I try, the slash before $ is removed, which produces incorrect path (foo$bar in this case).

I can probably "fix" it by prepending the slash back, but it's a bit hackish.

pkulchenko commented 3 years ago

@qgenesist, I opened #1108 to deal with the names with $ in them, as it turned out to be an interesting (and separate) issue.