mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/editor_controller] Fix backspace handling in text area
The editor controller handles backspace if it is at the beginning of a line, to remove multiple spaces to match the indentation, but it should not do so if there is an ongoing selection
This commit is contained in:
@@ -77,7 +77,7 @@ bool EditorController::textAreaDidReceiveEvent(TextArea * textArea, Ion::Events:
|
||||
return true;
|
||||
}
|
||||
|
||||
if (event == Ion::Events::Backspace) {
|
||||
if (event == Ion::Events::Backspace && textArea->selectionIsEmpty()) {
|
||||
/* If the cursor is on the left of the text of a line, backspace one
|
||||
* indentation space at a time. */
|
||||
const char * text = textArea->text();
|
||||
|
||||
Reference in New Issue
Block a user