Page 1 of 1

get("curitem"): Outdated help text?

Posted: 18 Jun 2026 08:33
by autocart
Not sure if I understand it correctly, but I think that something about get("curitem") is off.
When nothing is selected, it just returns ... nothing.
Either the help text seems off or the behaviour?
help file wrote:get() [...]

CurItem

"curitem", [part], [flags] and "curitemprev", [part], [flags]
Returns the current/previous item on whatever pane. Both take optional parameters path, file, base, and ext.
flags: (bit field)
1: Mind folders when returning "base" or "ext".
Note: get(curitem) differs from the native variable <curitem> in that it will return the previously selected and focused item if the currently focused item is not selected.
Examples:
echo get("curitem",); //E:\Test\b\c\Jane.txt
echo get("curitem", "drive"); //"E:" or "\\VEGA\Users"
[...]

Re: get("curitem"): Outdated help text?

Posted: 18 Jun 2026 09:39
by admin
You're right. The text should be like this:
Note: get(curitem) differs from the native variable <curitem> in that the latter will return the previously selected and focused item if the currently focused item is not selected.

Re: get("curitem"): Outdated help text?

Posted: 18 Jun 2026 22:22
by jupe
On a related topic Don, the recent changes in v28.30.0708/27.20.1403 to <cur*> resolving seems like it's going to be a breaking change in a lot of situations to me, just as one very basic example, historically scripts have had things in them like

if (<curitem>) { $f = <curitem>; } else { $f = <curpath>; }

which will now always have <curitem> resolved, but I can also think of many other ways in which previous script behavior will be unpredictably different now.

Re: get("curitem"): Outdated help text?

Posted: 18 Jun 2026 22:29
by autocart
jupe wrote: 18 Jun 2026 22:22 On a related topic Don, the recent changes in v28.30.0708 to <cur*> resolving seems like it's going to be a breaking change in a lot of situations to me, just as one very basic example, historically scripts have had things in them like

if (<curitem>) { $f = <curitem>; } else { $f = <curpath>; }

which will now always have <curitem> resolved, but I can also think of many other ways in which previous script behavior will be unpredictably different now.
Agreed, I thought that I had already noticed different script behaviour myself. That said, I personally can live with the change, since I don't have that many scripts but assume that jupe is raising a valid point.

Re: get("curitem"): Outdated help text?

Posted: 18 Jun 2026 22:43
by admin
Yes, it was a stupid idea. We already have <focitem>. I'll undo it in the next beta.