pop-os / launcher

Modular IPC-based desktop launcher service
Mozilla Public License 2.0
220 stars 42 forks source link

Calculator ignores equations beginning with special characters #126

Closed titojankowski closed 2 years ago

titojankowski commented 2 years ago

Distribution (run cat /etc/os-release): 22.04

Issue/Bug Description: Starting a calculation with a period or parentheses doesn't result in a calculation

Steps to reproduce (if you know):

Example A:

Example B:

Expected behavior: Example A: Calculator should show 1.1 as the top result

Example B: Calculator should show 2 as the top result

Other Notes: Related to #47

titojankowski commented 2 years ago

Are there any other valid "start" characters besides "." and "(" for an equation?

Negative sign "-" works.

n3m0-22 commented 2 years ago

I'm having this issue as well. Using the equals sign before the equation fixes the issue e.g., =(1+1) or =.1+1.

leviport commented 2 years ago

Originally the equals sign was required for any calculation. Later, a feature was added that allows calculations without the equals sign, but only if a calculation is detected. I imagine this is why certain characters stop calculations from showing.