Merge branch 'bad_delete' into 'master'

text input: Disable erasing

See merge request Librem5/squeekboard!332
This commit is contained in:
Dorota Czaplejewicz
2020-02-18 20:38:33 +00:00

View File

@ -139,6 +139,9 @@ impl Submission {
Err(imservice::SubmitError::NotActive) => false, Err(imservice::SubmitError::NotActive) => false,
} }
}, },
/* Delete_surrounding_text takes byte offsets,
* so cannot work without get_surrounding_text.
* This is a bug in the protocol.
(Some(imservice), Action::Erase) => { (Some(imservice), Action::Erase) => {
let submit_result = imservice.delete_surrounding_text(1, 0) let submit_result = imservice.delete_surrounding_text(1, 0)
.and_then(|_| imservice.commit()); .and_then(|_| imservice.commit());
@ -146,7 +149,7 @@ impl Submission {
Ok(()) => true, Ok(()) => true,
Err(imservice::SubmitError::NotActive) => false, Err(imservice::SubmitError::NotActive) => false,
} }
} }*/
(_, _) => false, (_, _) => false,
}; };