Fix highlighting of selection wrt. to empty lines. (#90435, #90582)

2002-12-25  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextdisplay.c (gtk_text_layout_draw): Fix highlighting of
	selection wrt. to empty lines.  (#90435, #90582)

	* gtk/gtktextview.c (gtk_text_view_preedit_changed_handler):
	Keep the cursor on screen.  (#96929)
This commit is contained in:
Matthias Clasen 2002-12-25 21:02:25 +00:00 committed by Matthias Clasen
parent 7832395243
commit 657c65ed4b
8 changed files with 55 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2002-12-25 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Fix highlighting of
selection wrt. to empty lines. (#90435, #90582)
* gtk/gtktextview.c (gtk_text_view_preedit_changed_handler):
Keep the cursor on screen. (#96929)
2002-12-24 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextbuffer.c (paste_from_buffer):

View File

@ -1,3 +1,11 @@
2002-12-25 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Fix highlighting of
selection wrt. to empty lines. (#90435, #90582)
* gtk/gtktextview.c (gtk_text_view_preedit_changed_handler):
Keep the cursor on screen. (#96929)
2002-12-24 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextbuffer.c (paste_from_buffer):

View File

@ -1,3 +1,11 @@
2002-12-25 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Fix highlighting of
selection wrt. to empty lines. (#90435, #90582)
* gtk/gtktextview.c (gtk_text_view_preedit_changed_handler):
Keep the cursor on screen. (#96929)
2002-12-24 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextbuffer.c (paste_from_buffer):

View File

@ -1,3 +1,11 @@
2002-12-25 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Fix highlighting of
selection wrt. to empty lines. (#90435, #90582)
* gtk/gtktextview.c (gtk_text_view_preedit_changed_handler):
Keep the cursor on screen. (#96929)
2002-12-24 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextbuffer.c (paste_from_buffer):

View File

@ -1,3 +1,11 @@
2002-12-25 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Fix highlighting of
selection wrt. to empty lines. (#90435, #90582)
* gtk/gtktextview.c (gtk_text_view_preedit_changed_handler):
Keep the cursor on screen. (#96929)
2002-12-24 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextbuffer.c (paste_from_buffer):

View File

@ -1,3 +1,11 @@
2002-12-25 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextdisplay.c (gtk_text_layout_draw): Fix highlighting of
selection wrt. to empty lines. (#90435, #90582)
* gtk/gtktextview.c (gtk_text_view_preedit_changed_handler):
Keep the cursor on screen. (#96929)
2002-12-24 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextbuffer.c (paste_from_buffer):

View File

@ -803,7 +803,8 @@ gtk_text_layout_draw (GtkTextLayout *layout,
&line_start,
line, 0);
line_end = line_start;
gtk_text_iter_forward_to_line_end (&line_end);
if (!gtk_text_iter_ends_line (&line_end))
gtk_text_iter_forward_to_line_end (&line_end);
byte_count = gtk_text_iter_get_line_index (&line_end);
if (gtk_text_iter_compare (&selection_start, &line_end) <= 0 &&
@ -817,7 +818,7 @@ gtk_text_layout_draw (GtkTextLayout *layout,
if (gtk_text_iter_compare (&selection_end, &line_end) <= 0)
selection_end_index = gtk_text_iter_get_line_index (&selection_end);
else
selection_end_index = byte_count;
selection_end_index = MAX(byte_count, 1);
}
}

View File

@ -6191,9 +6191,12 @@ gtk_text_view_preedit_changed_handler (GtkIMContext *context,
gtk_im_context_get_preedit_string (context, &str, &attrs, &cursor_pos);
gtk_text_layout_set_preedit_string (text_view->layout, str, attrs, cursor_pos);
pango_attr_list_unref (attrs);
g_free (str);
gtk_text_view_scroll_mark_onscreen (text_view,
gtk_text_buffer_get_mark (get_buffer (text_view),
"insert"));
}
static gboolean