Skip to content

Honor selected content upon input (Issue #214) #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lineinthesand
Copy link

@lineinthesand lineinthesand commented Dec 14, 2024

This addresses issue #214. Making an input/erasing with a selection in the editor now makes a difference when compared to no selection (e.g. adding parentheses/erasing the selected content etc.)

Note that I was not able to build the project cloned from github, only the one from https://git.bubu1.eu/Bubu/android-calculatorpp, so I do not know whether my changes actually work with this version. They do with the bubu version, as far as I have tested them.

@serso could you probably help me with building the github version of the calculator or publish some build instructions? That would be great! Thanks a lot.

@lineinthesand
Copy link
Author

ezgif-3-d7e76c9fa4

This addresses issue serso#214 of the upstream GitHub project:
serso#214

When text is selected in the editor input field, pressing a key will now
behave differently from when no text is selected.

* When pressing a digit or pasting text, the selected text will be
  replaced with the cursor to the right of the inserted text.
* When hitting backspace, the selected text will be erased without
  deleting the character left of the selection.
* When cutting selected text, the cursor will stay at the start of the
  original selection.
* When pressing an operator, the selected text will be put into
  parentheses and the cursor will be placed after these and the operator.
* When pressing parentheses, the selected text will be put in parentheses
  and the cursor will be placed after them.

The behavior with no text selected stays the same, i.e. the text cursor
will be put inside of  the parentheses when inserting them, backspace
will erase the content left to the cursor.
@Boldan
Copy link

Boldan commented Jan 22, 2025

Can you give me a copy of your app

@lineinthesand
Copy link
Author

lineinthesand commented Feb 16, 2025

@Boldan I could try, but it would only be a debug version

https://tinyurl.com/calculatorpp
This is my development version and currently also contains a customizable buttons grid

@Boldan
Copy link

Boldan commented Feb 16, 2025

@Boldan I could try, but it would only be a debug version

https://tinyurl.com/calculatorpp
This is my development version and currently also contains a customizable buttons grid

Well, my phone can't install it😂

@lineinthesand
Copy link
Author

It could be you'd have to uninstall the one from f-droid first and/or allow other sources for installing apk.
I've already made a pull-request in the gitlab repo, from which the app on f-droid is built. bubu actually gave me contributor rights but I hesitate to merge before I get his review/approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants