KristofferC / OhMyREPL.jl

Syntax highlighting and other enhancements for the Julia REPL
https://kristofferc.github.io/OhMyREPL.jl/latest/
Other
768 stars 60 forks source link

fix crash when repl.mistate is defined but nothing #353

Closed ExpandingMan closed 3 months ago

ExpandingMan commented 3 months ago

Don't really understand the change that was made as I didn't look into it, but suffice it to say it's possible for repl.mistate to be defined but nothing. In such a case it doesn't have the field interface and so OhMyREPL crashes on the next line. This adds a check for whether that field is nothing and does whatever it would do if it weren't defined. Not 100% confident this is the intended behavior but seems to work fine. I suspect that the isdefined(repl,:mistate) can be removed entirely, but I really don't know, so I left it in.