Merge lp:~michael-sheldon/ubuntu-keyboard/fix-1661283 into lp:ubuntu-keyboard

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: 539
Merged at revision: 543
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/fix-1661283
Merge into: lp:ubuntu-keyboard
Prerequisite: lp:~michael-sheldon/ubuntu-keyboard/fix-mir-deprecation
Diff against target: 30 lines (+4/-4)
2 files modified
src/plugin/inputmethod.cpp (+2/-2)
src/view/abstracttexteditor.cpp (+2/-2)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-keyboard/fix-1661283
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+316335@code.launchpad.net

This proposal supersedes a proposal from 2017-02-02.

Commit message

Allow predictive text in URL mode (but disable automatic space insertion)

Description of the change

Allow predictive text in URL mode (but disable automatic space insertion)

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/plugin/inputmethod.cpp'
2--- src/plugin/inputmethod.cpp 2016-12-10 01:16:27 +0000
3+++ src/plugin/inputmethod.cpp 2017-02-03 13:41:12 +0000
4@@ -418,9 +418,9 @@
5 {
6 Q_D(InputMethod);
7
8- if (d->contentType != FreeTextContentType
9+ if (d->contentType != FreeTextContentType && d->contentType != UrlContentType
10 && !(d->editor.wordEngine()->languageFeature()->alwaysShowSuggestions()
11- && (d->contentType == UrlContentType || d->contentType == EmailContentType))) {
12+ && d->contentType == EmailContentType)) {
13 d->wordEngineEnabled = false;
14 }
15
16
17=== modified file 'src/view/abstracttexteditor.cpp'
18--- src/view/abstracttexteditor.cpp 2016-08-18 13:50:14 +0000
19+++ src/view/abstracttexteditor.cpp 2017-02-03 13:41:12 +0000
20@@ -733,8 +733,8 @@
21 const bool auto_caps_activated = d->word_engine->languageFeature()->activateAutoCaps(d->text->preedit());
22 d->appendix_for_previous_preedit = d->word_engine->languageFeature()->appendixForReplacedPreedit(d->text->preedit());
23 if (d->auto_correct_enabled) {
24- if (!d->text->surroundingRight().trimmed().isEmpty() && d->editing_middle_of_text) {
25- // Don't insert a space if we are correcting a word in the middle of a sentence
26+ if ((!d->text->surroundingRight().trimmed().isEmpty() && d->editing_middle_of_text) || d->word_engine->languageFeature()->contentType() == Maliit::UrlContentType) {
27+ // Don't insert a space if we are correcting a word in the middle of a sentence or if we're in a Url field
28 d->appendix_for_previous_preedit = "";
29 d->editing_middle_of_text = false;
30 }

Subscribers

People subscribed via source and target branches