summaryrefslogtreecommitdiff
path: root/src/gui/gui-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui-window.c')
-rw-r--r--src/gui/gui-window.c72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/gui/gui-window.c b/src/gui/gui-window.c
index edc6c2f0a..78e8a461f 100644
--- a/src/gui/gui-window.c
+++ b/src/gui/gui-window.c
@@ -681,6 +681,78 @@ gui_window_scroll (struct t_gui_window *window, char *scroll)
}
/*
+ * gui_window_scroll_previous_highlight: scroll to previous highlight
+ */
+
+void
+gui_window_scroll_previous_highlight (struct t_gui_window *window)
+{
+ (void) window;
+
+ /*t_gui_line *ptr_line;
+
+ if ((gui_current_window->buffer->type == GUI_BUFFER_TYPE_FORMATED)
+ && (gui_current_window->buffer->text_search == GUI_TEXT_SEARCH_DISABLED))
+ {
+ if (gui_current_window->buffer->lines)
+ {
+ ptr_line = (window->start_line) ?
+ window->start_line->prev_line : gui_current_window->buffer->last_line;
+ while (ptr_line)
+ {
+ if (ptr_line->line_with_highlight)
+ {
+ window->start_line = ptr_line;
+ window->start_line_pos = 0;
+ window->first_line_displayed =
+ (window->start_line == gui_current_window->buffer->lines);
+ gui_buffer_ask_chat_refresh (gui_current_window->buffer, 1);
+ gui_buffer_ask_input_refresh (gui_current_window->buffer, 1);
+ return;
+ }
+ ptr_line = ptr_line->prev_line;
+ }
+ }
+ }*/
+}
+
+/*
+ * gui_window_scroll_next_highlight: scroll to next highlight
+ */
+
+void
+gui_window_scroll_next_highlight (struct t_gui_window *window)
+{
+ (void) window;
+
+ /*t_gui_line *ptr_line;
+
+ if ((gui_current_window->buffer->type == GUI_BUFFER_TYPE_FORMATED)
+ && (gui_current_window->buffer->text_search == GUI_TEXT_SEARCH_DISABLED))
+ {
+ if (gui_current_window->buffer->lines)
+ {
+ ptr_line = (window->start_line) ?
+ window->start_line->next_line : gui_current_window->buffer->lines->next_line;
+ while (ptr_line)
+ {
+ if (ptr_line->line_with_highlight)
+ {
+ window->start_line = ptr_line;
+ window->start_line_pos = 0;
+ window->first_line_displayed =
+ (window->start_line == gui_current_window->buffer->lines);
+ gui_buffer_ask_chat_refresh (gui_current_window->buffer, 1);
+ gui_buffer_ask_input_refresh (gui_current_window->buffer, 1);
+ return;
+ }
+ ptr_line = ptr_line->next_line;
+ }
+ }
+ }*/
+}
+
+/*
* gui_window_search_text: search text in a buffer
*/