r1320@localhost: muntyan | 2005-12-09 15:12:23 -0600

moo_text_buffer_get_line_marks_at_line()
This commit is contained in:
Yevgen Muntyan 2005-12-11 04:24:32 +00:00
parent 4d1da59066
commit 0afae6d4ca
2 changed files with 16 additions and 4 deletions

View File

@ -455,7 +455,7 @@ moo_text_buffer_insert_text (GtkTextBuffer *text_buffer,
if (starts_line && ins_line)
{
GSList *l, *marks;
marks = moo_text_buffer_get_line_marks_in_range (buffer, first_line, first_line);
marks = moo_text_buffer_get_line_marks_at_line (buffer, first_line);
for (l = marks; l != NULL; l = l->next)
moo_text_buffer_move_line_mark (buffer, l->data, last_line);
g_slist_free (marks);
@ -1735,11 +1735,21 @@ moo_text_buffer_move_line_mark (MooTextBuffer *buffer,
GSList *
moo_text_buffer_get_line_marks_in_range (MooTextBuffer *buffer,
int first_line,
int last_line)
moo_text_buffer_get_line_marks_in_range (MooTextBuffer *buffer,
int first_line,
int last_line)
{
g_return_val_if_fail (MOO_IS_TEXT_BUFFER (buffer), NULL);
g_return_val_if_fail (first_line >= 0, NULL);
return moo_line_buffer_get_marks_in_range (buffer->priv->line_buf, first_line, last_line);
}
GSList *
moo_text_buffer_get_line_marks_at_line (MooTextBuffer *buffer,
int line)
{
g_return_val_if_fail (MOO_IS_TEXT_BUFFER (buffer), NULL);
g_return_val_if_fail (line >= 0, NULL);
return moo_line_buffer_get_marks_in_range (buffer->priv->line_buf, line, line);
}

View File

@ -97,6 +97,8 @@ void moo_text_buffer_move_line_mark (MooTextBuffer *buf
GSList *moo_text_buffer_get_line_marks_in_range (MooTextBuffer *buffer,
int first_line,
int last_line);
GSList *moo_text_buffer_get_line_marks_at_line (MooTextBuffer *buffer,
int line);
void _moo_text_buffer_ensure_highlight (MooTextBuffer *buffer,
int first_line,