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

Proposed by Michael Sheldon
Status: Superseded
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/fix-1661283
Merge into: lp:ubuntu-keyboard
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 Pending
Ubuntu Phablet Team Pending
Review via email: mp+316246@code.launchpad.net

This proposal has been superseded by a proposal from 2017-02-03.

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.
538. By Michael Sheldon

Merge Mir deprecation updates

539. By Michael Sheldon

Disable spaces on word ribbon selection, but keep them when pressing the space bar

Unmerged revisions

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-02 16:06:50 +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-02 16:06:50 +0000
20@@ -501,8 +501,8 @@
21 }
22
23 if (replace_preedit) {
24- if (!textOnRight.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 ((!textOnRight.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 URL mode
28 space = "";
29 d->look_for_a_double_space = false;
30 d->editing_middle_of_text = false;

Subscribers

People subscribed via source and target branches