Log In  

I just found that the Shift + Enter shortcut doesn't work after the 'else' keyword. I know it was supposed to be context aware, I see it properly adds 'until' after 'repeat' which is nice, but this case seems to have been omitted in the update which makes coding slightly annoying.

I'm not sure if this is a bug or a (not so useful) feature, because it's consistent with the changelog which states that as of 0.2.2b:
> shift+enter in code editor only auto-completes block for DO, THEN, REPEAT or FUNCTION
and not ELSE. If this is intended I'll move the post to the workshop section as a feature request.

Version: 0.2.2c

P#90570 2021-04-14 22:50 ( Edited 2021-04-15 00:01)

1

Seconding this bug report/feature request - I very frequently would make my if and else lines first, so they would both indent at the same level, and then Shift+Enter to add the end.

I very much like the reduced rate of "indent and add an end statement" typos from the limitation, but autocompleting blocks for else statements would be great.

P#90574 2021-04-14 22:59

Sorry for the offtop, but how to mark my post as "resolved"?

P#90583 2021-04-15 00:00
1

It should be in the downward-triangle menu below the heart symbol next to the original post.

P#90584 2021-04-15 00:14

Did as thorough a test as I could in PICO-8 0.2.2c - in each case below, I wrote the first line of the block, hit Shift+Enter, and recorded the result, adding the closure of the block as necessary:

do
    --do works
end

while x do
    --while x do works
end

repeat
    --repeat until x works
until x

if x then
    -- if x then works
end

if x then
elseif y then
    -- elseif y then works
end

if x then
else
--else doesn't work
end

for x=y,z,w do
    --for x=y,z,w do works
end

function x()
    --function x() works
end

x=function ()
--x = function () doesn't work
end

local function x()
--local function x() doesn't work
end


tl;dr the ones I found that were broken were:

  • else
  • x = function ()
  • local function x()
P#90894 2021-04-21 15:51 ( Edited 2021-04-21 15:52)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-02-03 13:53:48 | 0.005s | Q:11