Open Azeirah opened 9 years ago
Reproduce: Start with number 50 Scrub to -50 Scrub back to 50, don't release mouse and scrub back to -50.
Looking at a negative number in Moonchild, you can see the minus sign doesn't have a dotted underline.. The sign of a number is not considered.
The problem is that the widget looks for AST nodes of type 'Literal', and by JavaScript's grammar, -50 is a 'UnaryExpression' whose argument is the literal 50: http://esprima.org/demo/parse.html?code=-50
-50
50
Reproduce: Start with number 50 Scrub to -50 Scrub back to 50, don't release mouse and scrub back to -50.
Looking at a negative number in Moonchild, you can see the minus sign doesn't have a dotted underline.. The sign of a number is not considered.