"else" in try-catch breaks cell-editor?

The new Julia-1.8 else-branch in try-catch seems to break the Pluto cell editor for me.

I’m on Julia 1.8.4 (macOS ARM), Pluto 0.19.19.

Does anybody else have this problem?

Reproducing it

I start a new Julia+Pluto session, create a new notebook, and copy-paste this into the first cell:

begin
    try
        x = 7
    catch
        println("no")
    else
        println("yes")
    end
end

Then I run the cell – it prints “yes” into the mini-terminal, as expected.

Then I click the cursor into the cell and move it with the cursor-arrow-keys: The cursor jumps around.

With some more effort, you can make characters disappear. (Hint: Try typing the code above without the begin/end.)

1 Like

Update:
Pluto 0.19.22 — still broken.

Does anybody know if there’s an Issue open for it?

file an issue with Pluto people? GitHub - fonsp/Pluto.jl: 🎈 Simple reactive notebooks for Julia

try-catch-else is now supported in Pluto@0.19.31. In the future, do not hesitate to open an issue on the repository for missing features such as this one (I did not know about try-catch-else before randomly finding this post).

2 Likes