After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 155890 - End of line doesn't go to end of line
End of line doesn't go to end of line
Status: RESOLVED DUPLICATE of bug 81412
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
2.5.x
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-10-19 21:58 UTC by Ben Roe
Modified: 2011-02-04 16:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8



Description Ben Roe 2004-10-19 21:58:51 UTC
Please describe the problem:
Pressing the End key on my keyboard should move the cursor to the end of the
current line, but it doesn't; it moves the cursor to the penultimate character.

Steps to reproduce:
1. Disable word wrap
2. Type a long line of text until it reaches the edge of the windows and flows
onto the next line
3. Move the cursor to the first line of text
4. Press the End key


Actual results:
The cursor ends up just before the last character

Expected results:
The cursor moves to after the last character

Does this happen every time?
Yes

Other information:
Comment 1 Paolo Borelli 2004-10-19 22:42:33 UTC
moving to gtktextview. The bug can be reproduced with gtk-demo's multiple text
views example, in the "This line has character-based wrapping, and can wrap
between any two character glyphs. Let's make this a long paragraph to
demonstrate: blah blah blah blah blah " paragraph.
Comment 2 Owen Taylor 2004-10-20 00:12:49 UTC
Here's a comment from pango-layout.c that describes the problem:

  /* This is a HACK. If a program only keeps track if cursor (etc)
   * indices and not the trailing flag, then the trailing index of the
   * last character on a wrapped line is identical to the leading
   * index of the next line. So, we fake it and set the trailing flag
   * to zero.
   *
   * That is, if the text is "now is the time", and is broken between
   * 'now' and 'is'
   *
   * Then when the cursor is actually at:
   *
   * n|o|w| |i|s|
   *              ^
   * we lie and say it is at:
   *
   * n|o|w| |i|s|
   *            ^
   *
   * So the cursor won't appear on the next line before 'the'.
   *
   * Actually, any program keeping cursor
   * positions with wrapped lines should distinguish leading and
   * trailing cursors.
   */

It's not very noticeable with Latin text because lines typically end
on spaces, but is much worse for CJK/Thai/etc.


*** This bug has been marked as a duplicate of 81412 ***