Bug 338645 - Custom autocorrection: Cursor does not jump to end of replaced string
Summary: Custom autocorrection: Cursor does not jump to end of replaced string
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 4.13.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-29 08:30 UTC by Florian
Modified: 2014-09-05 06:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.1


Attachments
Animated demo of the problem (67.06 KB, image/gif)
2014-08-29 08:31 UTC, Florian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian 2014-08-29 08:30:43 UTC
In German language "mfg" is a shortcut for "Mit freundlichen Grüßen" - a common way to end E-mails and letters. I added this as a custom word replacement entry for the German language (mfg → Mit freundlichen Grüßen).

When I type "mfg<enter>", mfg gets replaced as expected, but cursor jumps to the end of the first word ("Mit"). The rest of the replaced string is then shown in a new line due to the <enter>.

Reproducible: Always

Steps to Reproduce:
1. Setup the word replacement as described
2. Create new E-mail
3. enter "mfg" and hit enter
Actual Results:  
Mit 
<cursor>freundlichen Grüßen

Expected Results:  
Mit freundlichen Grüßen
<cursor>

Probably another bug: Word replacements do not work anymore if you switch identity while composing a message.

$ uname -a
Linux mycomputer 3.13.0-34-generic #60-Ubuntu SMP Wed Aug 13 15:45:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Comment 1 Florian 2014-08-29 08:31:16 UTC
Created attachment 88483 [details]
Animated demo of the problem
Comment 2 Laurent Montel 2014-08-29 11:12:12 UTC
Thanks for demo.
I will investigate it.
Regards
Comment 3 Laurent Montel 2014-09-04 17:43:33 UTC
Git commit 03976b194607517be2e3265156678e555c11f556 by Montel Laurent.
Committed on 04/09/2014 at 17:43.
Pushed by mlaurent into branch 'KDE/4.14'.

Fix Bug 338645 - Custom autocorrection: Cursor does not jump to end of replaced string

FIXED-IN: 4.14.1

M  +13   -6    pimcommon/autocorrection/autocorrection.cpp
M  +1    -1    pimcommon/autocorrection/autocorrection.h

http://commits.kde.org/kdepim/03976b194607517be2e3265156678e555c11f556
Comment 4 Laurent Montel 2014-09-05 06:11:41 UTC
I create new unit test for test all autocorrection features.
Now it will more easy to test it :)