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 81412 - Track leading/trailing cursor positions
Track leading/trailing cursor positions
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
2.0.x
Other Linux
: Normal normal
: Medium feature
Assigned To: gtk-bugs
gtk-bugs
: 155890 396308 428252 517434 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-05-10 21:57 UTC by Evert Verhellen
Modified: 2018-02-10 03:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Evert Verhellen 2002-05-10 21:57:46 UTC
Description of Problem:
The [End] key does not always position the text cursor behind the last
character when a line is wrapped.

Steps to reproduce the problem:
1. Start gedit2.
2. Type in the following text (do not type the line number):

   1 The quick brown fox jumps over the fat and lazy dog. The quick brown fox j
     umps over the fat and lazy dog.

3. Press the [Up] key.
4. Press the [End] key.

Actual Results:
The text cursor ("|") is positioned in front of the last character.

   1 The quick brown fox jumps over the fat and lazy dog. The quick brown
fox |j
     umps over the fat and lazy dog.

Expected Results:
The text cursor ("|") should be positioned behind the last character.

   1 The quick brown fox jumps over the fat and lazy dog. The quick brown
fox j|
     umps over the fat and lazy dog.

How often does this happen?
Most of the time. It appears to depend on the window width.

Version Details:
gtk2-2.0.2.0.200205071406-0.snap.ximian.1
gedit2-1.118.0.0.200205071406-0.snap.ximian.1
Comment 1 Matthias Clasen 2002-12-22 22:59:21 UTC
I believe that this bug is described by the following comment in
gtktextlayout.c:

          /* FIXME: As a bad hack, we move back one position when we
	   * are inside a paragraph to avoid going to next line on a
	   * forced break not at whitespace. Real fix is to keep track
	   * of whether marks are at leading or trailing edge?  */
Comment 2 Owen Taylor 2003-06-05 16:30:33 UTC
Would need to add a leading/trailing flag to GtkTextMark;
that's simple, but using it everywhere would be some work.

This bug, is however, pretty important for CJK, Thai,
and other languages that don't use whitespace for text
boundaries.
Comment 3 Owen Taylor 2004-10-20 00:12:50 UTC
*** Bug 155890 has been marked as a duplicate of this bug. ***
Comment 4 Owen Taylor 2007-10-18 04:19:45 UTC
*** Bug 428252 has been marked as a duplicate of this bug. ***
Comment 5 Owen Taylor 2007-10-18 05:23:08 UTC
*** Bug 396308 has been marked as a duplicate of this bug. ***
Comment 6 Yevgen Muntyan 2008-02-19 18:21:20 UTC
*** Bug 517434 has been marked as a duplicate of this bug. ***
Comment 7 Matthias Clasen 2018-02-10 03:40:44 UTC
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and
still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue
for it.