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 60630 - Cursor position not always displayed in GtkTextView
Cursor position not always displayed in GtkTextView
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
1.3.x
Other Solaris
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2001-09-17 10:40 UTC by padraig.obriain
Modified: 2011-02-04 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to pango/pango-layout.c (1.84 KB, patch)
2001-09-19 07:33 UTC, padraig.obriain
none Details | Review

Description padraig.obriain 2001-09-17 10:40:00 UTC
Use the program testtext in gtk+/tests. Use Test|Example to add text and
choose Settings|Wrap Off.

Move the cursor to just before the last "text" in line 2. Press the up
arrow key. The cursor is at the end of line 1 but the start of line 1 is on
the screen.
Comment 1 padraig.obriain 2001-09-18 08:32:45 UTC
The function gtk_text_layout_get_iter_location() seems to return the
wrong rectangle. The problem seems to be the behavior of
pango_layout_index_to_pos() when the byte index corresponds to the end
of the line. The function pango_layout_iter_get_run_extents() is
called with NULL ink extents.
Comment 2 padraig.obriain 2001-09-19 07:33:13 UTC
Created attachment 5626 [details] [review]
patch to pango/pango-layout.c
Comment 3 padraig.obriain 2001-09-19 07:34:04 UTC
I have attached a propsoed change to pango/pango-layoout.c to fix the
problem.
Comment 4 Owen Taylor 2001-09-24 22:30:41 UTC
Mon Sep 24 18:19:22 2001  Owen Taylor  <otaylor@redhat.com>

	* pango/pango-layout.c (pango_layout_index_to_pos): Fix
	handling of the last index in a paragraph.
	(#60630, fix based on patch from Padraig O'Briain.)