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
=== modified file 'src/plugin/inputmethod.cpp'
--- src/plugin/inputmethod.cpp 2016-12-10 01:16:27 +0000
+++ src/plugin/inputmethod.cpp 2017-02-03 13:41:12 +0000
@@ -418,9 +418,9 @@
418{418{
419 Q_D(InputMethod);419 Q_D(InputMethod);
420420
421 if (d->contentType != FreeTextContentType421 if (d->contentType != FreeTextContentType && d->contentType != UrlContentType
422 && !(d->editor.wordEngine()->languageFeature()->alwaysShowSuggestions()422 && !(d->editor.wordEngine()->languageFeature()->alwaysShowSuggestions()
423 && (d->contentType == UrlContentType || d->contentType == EmailContentType))) {423 && d->contentType == EmailContentType)) {
424 d->wordEngineEnabled = false;424 d->wordEngineEnabled = false;
425 }425 }
426426
427427
=== modified file 'src/view/abstracttexteditor.cpp'
--- src/view/abstracttexteditor.cpp 2016-08-18 13:50:14 +0000
+++ src/view/abstracttexteditor.cpp 2017-02-03 13:41:12 +0000
@@ -733,8 +733,8 @@
733 const bool auto_caps_activated = d->word_engine->languageFeature()->activateAutoCaps(d->text->preedit());733 const bool auto_caps_activated = d->word_engine->languageFeature()->activateAutoCaps(d->text->preedit());
734 d->appendix_for_previous_preedit = d->word_engine->languageFeature()->appendixForReplacedPreedit(d->text->preedit());734 d->appendix_for_previous_preedit = d->word_engine->languageFeature()->appendixForReplacedPreedit(d->text->preedit());
735 if (d->auto_correct_enabled) {735 if (d->auto_correct_enabled) {
736 if (!d->text->surroundingRight().trimmed().isEmpty() && d->editing_middle_of_text) {736 if ((!d->text->surroundingRight().trimmed().isEmpty() && d->editing_middle_of_text) || d->word_engine->languageFeature()->contentType() == Maliit::UrlContentType) {
737 // Don't insert a space if we are correcting a word in the middle of a sentence737 // 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
738 d->appendix_for_previous_preedit = "";738 d->appendix_for_previous_preedit = "";
739 d->editing_middle_of_text = false;739 d->editing_middle_of_text = false;
740 }740 }

Subscribers

People subscribed via source and target branches