summaryrefslogtreecommitdiff
path: root/src/gui/gui-buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui-buffer.c')
-rw-r--r--src/gui/gui-buffer.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index e53379a04..034a221be 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -290,6 +290,26 @@ gui_buffer_search (char *server, char *channel)
}
/*
+ * gui_buffer_search_by_number: search a buffer by number
+ */
+
+t_gui_buffer *
+gui_buffer_search_by_number (int number)
+{
+ t_gui_buffer *ptr_buffer;
+
+ for (ptr_buffer = gui_buffers; ptr_buffer;
+ ptr_buffer = ptr_buffer->next_buffer)
+ {
+ if (ptr_buffer->number == number)
+ return ptr_buffer;
+ }
+
+ /* buffer not found */
+ return NULL;
+}
+
+/*
* gui_buffer_find_window: find a window displaying buffer
*/