From 15dad291c7829c4ae7855880654b94d6edb4f17f Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Tue, 8 Sep 2015 00:55:34 +0200 Subject: Replace some hairy logic with g_array_remove_range In the hope it'll do the same under the hood. --- src/fe-text/gui-readline.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index 90399711..c4c0064e 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -679,9 +679,7 @@ static void sig_input(void) if (seq_start) { paste_bracketed_mode = TRUE; /* remove the leading sequence chars */ - memmove(paste_buffer->data, paste_buffer->data + sizeof(bp_start), - paste_buffer->len * g_array_get_element_size(paste_buffer) - sizeof(bp_start)); - g_array_set_size(paste_buffer, paste_buffer->len - 6); + g_array_remove_range(paste_buffer, 0, 6); } if (seq_end) { -- cgit v1.2.3