summaryrefslogtreecommitdiff
path: root/src/glibext/gbufferline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glibext/gbufferline.c')
-rw-r--r--src/glibext/gbufferline.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/glibext/gbufferline.c b/src/glibext/gbufferline.c
index ac838b8..0422af5 100644
--- a/src/glibext/gbufferline.c
+++ b/src/glibext/gbufferline.c
@@ -1010,15 +1010,15 @@ GSList *g_buffer_line_highlight_all_same_segments(const GBufferLine *line, GSLis
* *
* Description : Ajoute du texte à formater dans une ligne donnée. *
* *
-* Retour : - *
+* Retour : Portion de texte mis en place, voire NULL. *
* *
* Remarques : - *
* *
******************************************************************************/
-void g_buffer_line_insert_text(GBufferLine *line, BufferLineColumn column, const char *text, size_t length, RenderingTagType type)
+GBufferSegment *g_buffer_line_insert_text(GBufferLine *line, BufferLineColumn column, const char *text, size_t length, RenderingTagType type)
{
- GBufferSegment *segment; /* Portion de texte à ajouter */
+ GBufferSegment *result; /* Portion de texte à renvoyer */
if (length == 0)
return;
@@ -1031,8 +1031,10 @@ void g_buffer_line_insert_text(GBufferLine *line, BufferLineColumn column, const
else
line->last_used = column;
- segment = g_buffer_segment_new(type, text, length);
- g_buffer_line_add_segment(line, column, segment);
+ result = g_buffer_segment_new(type, text, length);
+ g_buffer_line_add_segment(line, column, result);
+
+ return result;
}