Bug SS-86
2 votes

Unary plus or minus leading to inconsistent insert behaviour

Created by Martin Kraska on 3/27/2014 3:43 PM Last Updated by smath on 3/15/2016 5:04 PM
%
 (hrs)
Logged: 0   (hrs)

 Description

If a function is inserted with the insert point (vertical line) in front of the expression, then the scoped (underlined) part of the expression is expected to become the first argument of that function.

This, however, does not work for expressions starting with unary plus or minus

Workaround is to put the insert point at the end of that expression, which is visually odd and non-intuitive.

The example is given for the list operator, could equally be any function inserted from the palette.

It seems that unary plus or minus create an invisible placeholder in front of them, which absorbs any inserts regardless of the scope extension.

    smath (Tuesday, March 15, 2016 5:04 PM) #

This is by design: as long as cursor located before unary plus or minus inserting system (actually anything can be used instead of system) will put this system before this unary plus or minus. Otherwise it will be impossible to insert anything before unary operator.