Bug 152808 - [Patch] Characters are appended to first line
Summary: [Patch] Characters are appended to first line
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 151917 153251 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-23 23:13 UTC by Torquil Macdonald Sørensen
Modified: 2007-12-10 03:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch for review (895 bytes, patch)
2007-11-26 17:30 UTC, Thomas Friedrichsmeier
Details
Katepart IM method fix (2.67 KB, patch)
2007-12-06 05:16 UTC, Hamish Rodda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torquil Macdonald Sørensen 2007-11-23 23:13:16 UTC
Version:           3.96.00 (using KDE KDE 3.95.0)
Installed from:    Debian testing/unstable Packages

Strange things happen in kwrite when using the character é (e with an accent):

Sometimes when trying to write a é somewhere in the first line, the whole line disappears and I am left with only a é

Sometimes this doesn't happen, e.g. I manage to get a é at the end of the first line. But when I then try to write an é on the second line, it instead appears at the end of the first line, while the text cursor is on the second line.

I have LANG=no_NO.UTF-8

Best regards,
Torquil Sørensen
Comment 1 Thomas Friedrichsmeier 2007-11-26 17:30:41 UTC
Created attachment 22205 [details]
Patch for review

1) I can reprocude this bug in POSIX locale and SVN revision 741752
2) Attaching a proposed patch which fixes the reported issue.

The problem used to be that KateViewInternal never realized the first composed
input has finished. Therefore, the first "é" is inserted correctly, all
following composed characters are inserted at the position of the first as
well.

I am not too familiar with InputMethod stuff, though, and not sure this is the
correct solution. Please review.
Comment 2 Thomas Friedrichsmeier 2007-11-29 21:08:38 UTC
Confirming.

Note that it's not so much caused by accents, but by composing a character (in this case with a dead accent key, followed by an "e"). Using an fr keyboard layout "é"s can be typed without problems.
Comment 3 Thomas Friedrichsmeier 2007-12-02 19:37:57 UTC
*** Bug 153251 has been marked as a duplicate of this bug. ***
Comment 4 Hamish Rodda 2007-12-06 05:16:19 UTC
Created attachment 22376 [details]
Katepart IM method fix

I've reviewed the previous patch, and it causes errors when writing in
Japanese.  This new patch seems to work for both cases, makes more sense to me,
and doesn't require accessing the input context (I don't think it should have
to).  Please test this patch.

Thanks, Hamish.
Comment 5 Thomas Friedrichsmeier 2007-12-06 12:44:27 UTC
Your patch works fine, here (tested with various dead keys, but only european characters).

While you're at it, though, I can still reproduce bug #102366 .
Comment 6 Hamish Rodda 2007-12-06 14:06:41 UTC
SVN commit 745575 by rodda:

Fix IM input positioning and overwriting bugs
Reviewed by Thomas Friedrichsmeier (thanks!)

BUG:152808


 M  +28 -13    kateviewinternal.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=745575
Comment 7 Hamish Rodda 2007-12-10 03:39:08 UTC
*** Bug 151917 has been marked as a duplicate of this bug. ***