1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 06:16:40 +02:00

Use of /window command for some key bindings with actions on current window (like scroll, ..)

This commit is contained in:
Sebastien Helleu
2008-04-18 12:56:21 +02:00
parent e349ae491a
commit b31c3efc8a
8 changed files with 307 additions and 412 deletions
+105
View File
@@ -2204,6 +2204,111 @@ command_window (void *data, struct t_gui_buffer *buffer,
return WEECHAT_RC_OK;
}
/* page up in current window */
if (string_strcasecmp (argv[1], "page_up") == 0)
{
gui_window_page_up (gui_current_window);
return WEECHAT_RC_OK;
}
/* page down in current window */
if (string_strcasecmp (argv[1], "page_down") == 0)
{
gui_window_page_down (gui_current_window);
return WEECHAT_RC_OK;
}
/* scroll up current window */
if (string_strcasecmp (argv[1], "scroll_up") == 0)
{
gui_window_scroll_up (gui_current_window);
return WEECHAT_RC_OK;
}
/* scroll down current window */
if (string_strcasecmp (argv[1], "scroll_down") == 0)
{
gui_window_scroll_down (gui_current_window);
return WEECHAT_RC_OK;
}
/* scroll to top of current window */
if (string_strcasecmp (argv[1], "scroll_top") == 0)
{
gui_window_scroll_top (gui_current_window);
return WEECHAT_RC_OK;
}
/* scroll to bottom of current window */
if (string_strcasecmp (argv[1], "scroll_bottom") == 0)
{
gui_window_scroll_bottom (gui_current_window);
return WEECHAT_RC_OK;
}
/* scroll to previous highlight of current window */
if (string_strcasecmp (argv[1], "scroll_previous_highlight") == 0)
{
gui_window_scroll_previous_highlight (gui_current_window);
return WEECHAT_RC_OK;
}
/* scroll to next highlight of current window */
if (string_strcasecmp (argv[1], "scroll_next_highlight") == 0)
{
gui_window_scroll_next_highlight (gui_current_window);
return WEECHAT_RC_OK;
}
/* scroll topic left for current window */
if (string_strcasecmp (argv[1], "scroll_topic_left") == 0)
{
gui_window_scroll_topic_left (gui_current_window);
return WEECHAT_RC_OK;
}
/* scroll topic right for current window */
if (string_strcasecmp (argv[1], "scroll_topic_right") == 0)
{
gui_window_scroll_topic_right (gui_current_window);
return WEECHAT_RC_OK;
}
/* page up for nicklist in current window */
if (string_strcasecmp (argv[1], "nicklist_page_up") == 0)
{
gui_window_nicklist_page_up (gui_current_window);
return WEECHAT_RC_OK;
}
/* page down for nicklist in current window */
if (string_strcasecmp (argv[1], "nicklist_page_down") == 0)
{
gui_window_nicklist_page_down (gui_current_window);
return WEECHAT_RC_OK;
}
/* beginning of nicklist for current window */
if (string_strcasecmp (argv[1], "nicklist_beginning") == 0)
{
gui_window_nicklist_beginning (gui_current_window);
return WEECHAT_RC_OK;
}
/* end of nicklist for current window */
if (string_strcasecmp (argv[1], "nicklist_end") == 0)
{
gui_window_nicklist_end (gui_current_window);
return WEECHAT_RC_OK;
}
/* refresh screen */
if (string_strcasecmp (argv[1], "refresh") == 0)
{
gui_window_refresh_screen (1);
return WEECHAT_RC_OK;
}
/* split window horizontally */
if (string_strcasecmp (argv[1], "splith") == 0)
{
+22 -33
View File
@@ -81,21 +81,6 @@ gui_keyboard_default_bindings ()
gui_keyboard_bind (NULL, /* ^up */ "meta-Oa", "up_global");
gui_keyboard_bind (NULL, /* down */ "meta2-B", "down");
gui_keyboard_bind (NULL, /* ^down */ "meta-Ob", "down_global");
gui_keyboard_bind (NULL, /* pgup */ "meta2-5~", "page_up");
gui_keyboard_bind (NULL, /* pgup */ "meta2-I", "page_up");
gui_keyboard_bind (NULL, /* pgdn */ "meta2-6~", "page_down");
gui_keyboard_bind (NULL, /* pgdn */ "meta2-G", "page_down");
gui_keyboard_bind (NULL, /* m-pgup */ "meta-meta2-5~", "scroll_up");
gui_keyboard_bind (NULL, /* m-pgdn */ "meta-meta2-6~", "scroll_down");
gui_keyboard_bind (NULL, /* m-home */ "meta-meta2-1~", "scroll_top");
gui_keyboard_bind (NULL, /* m-end */ "meta-meta2-4~", "scroll_bottom");
gui_keyboard_bind (NULL, /* F9 */ "meta2-20~", "scroll_topic_left");
gui_keyboard_bind (NULL, /* F10 */ "meta2-21~", "scroll_topic_right");
gui_keyboard_bind (NULL, /* F11 */ "meta2-23~", "nick_page_up");
gui_keyboard_bind (NULL, /* F12 */ "meta2-24~", "nick_page_down");
gui_keyboard_bind (NULL, /* m-F11 */ "meta-meta2-23~", "nick_beginning");
gui_keyboard_bind (NULL, /* m-F12 */ "meta-meta2-24~", "nick_end");
gui_keyboard_bind (NULL, /* ^L */ "ctrl-L", "refresh");
gui_keyboard_bind (NULL, /* m-a */ "meta-a", "jump_smart");
gui_keyboard_bind (NULL, /* m-b */ "meta-b", "previous_word");
gui_keyboard_bind (NULL, /* ^left */ "meta-Od", "previous_word");
@@ -110,8 +95,6 @@ gui_keyboard_default_bindings ()
gui_keyboard_bind (NULL, /* m-j,m-s */ "meta-jmeta-s", "jump_server");
gui_keyboard_bind (NULL, /* m-j,m-x */ "meta-jmeta-x", "jump_next_server");
gui_keyboard_bind (NULL, /* m-k */ "meta-k", "grab_key");
gui_keyboard_bind (NULL, /* m-n */ "meta-n", "scroll_next_highlight");
gui_keyboard_bind (NULL, /* m-p */ "meta-p", "scroll_previous_highlight");
gui_keyboard_bind (NULL, /* m-r */ "meta-r", "delete_line");
gui_keyboard_bind (NULL, /* m-s */ "meta-s", "switch_server");
gui_keyboard_bind (NULL, /* m-u */ "meta-u", "scroll_unread");
@@ -130,6 +113,23 @@ gui_keyboard_default_bindings ()
gui_keyboard_bind (NULL, /* m-right */ "meta-meta2-C", "/buffer +1");
gui_keyboard_bind (NULL, /* m-right (kde) */ "meta2-1;3C", "/buffer +1");
gui_keyboard_bind (NULL, /* F6 */ "meta2-17~", "/buffer +1");
gui_keyboard_bind (NULL, /* pgup */ "meta2-5~", "/window page_up");
gui_keyboard_bind (NULL, /* pgup */ "meta2-I", "/winfow page_up");
gui_keyboard_bind (NULL, /* pgdn */ "meta2-6~", "/window page_down");
gui_keyboard_bind (NULL, /* pgdn */ "meta2-G", "/window page_down");
gui_keyboard_bind (NULL, /* m-pgup */ "meta-meta2-5~", "/window scroll_up");
gui_keyboard_bind (NULL, /* m-pgdn */ "meta-meta2-6~", "/window scroll_down");
gui_keyboard_bind (NULL, /* m-home */ "meta-meta2-1~", "/window scroll_top");
gui_keyboard_bind (NULL, /* m-end */ "meta-meta2-4~", "/window scroll_bottom");
gui_keyboard_bind (NULL, /* m-n */ "meta-n", "/window scroll_next_highlight");
gui_keyboard_bind (NULL, /* m-p */ "meta-p", "/window scroll_previous_highlight");
gui_keyboard_bind (NULL, /* F9 */ "meta2-20~", "/window scroll_topic_left");
gui_keyboard_bind (NULL, /* F10 */ "meta2-21~", "/window scroll_topic_right");
gui_keyboard_bind (NULL, /* F11 */ "meta2-23~", "/window nicklist_page_up");
gui_keyboard_bind (NULL, /* F12 */ "meta2-24~", "/window nicklist_page_down");
gui_keyboard_bind (NULL, /* m-F11 */ "meta-meta2-23~", "/window nicklist_beginning");
gui_keyboard_bind (NULL, /* m-F12 */ "meta-meta2-24~", "/window nicklist_end");
gui_keyboard_bind (NULL, /* ^L */ "ctrl-L", "/window refresh");
gui_keyboard_bind (NULL, /* F7 */ "meta2-18~", "/window -1");
gui_keyboard_bind (NULL, /* F8 */ "meta2-19~", "/window +1");
gui_keyboard_bind (NULL, /* m-w,m-up */ "meta-wmeta-meta2-A", "/window up");
@@ -295,22 +295,11 @@ gui_keyboard_flush ()
if (strcmp (key_str, "^^") == 0)
key_str[1] = '\0';
/*switch (gui_current_window->buffer->type)
{
case GUI_BUFFER_TYPE_STANDARD:*/
gui_input_insert_string (gui_current_window->buffer,
key_str, -1);
if (gui_current_window->buffer->completion)
gui_current_window->buffer->completion->position = -1;
input_draw = 1;
//break;
/*case GUI_BUFFER_TYPE_DCC:
gui_exec_action_dcc (gui_current_window, key_str);
break;
case GUI_BUFFER_TYPE_RAW_DATA:
gui_exec_action_raw_data (gui_current_window, key_str);
break;
}*/
gui_input_insert_string (gui_current_window->buffer,
key_str, -1);
if (gui_current_window->buffer->completion)
gui_current_window->buffer->completion->position = -1;
input_draw = 1;
}
/* incremental text search in buffer */
+51 -51
View File
@@ -969,11 +969,58 @@ gui_window_scroll_topic_right (struct t_gui_window *window)
}
/*
* gui_window_nick_beginning: go to beginning of nicklist
* gui_window_nicklist_page_up: scroll one page up in nicklist
*/
void
gui_window_nick_beginning (struct t_gui_window *window)
gui_window_nicklist_page_up (struct t_gui_window *window)
{
if (!gui_ok)
return;
if (window->buffer->nicklist)
{
if (window->win_nick_start > 0)
{
window->win_nick_start -= (window->win_nick_num_max - 1);
if (window->win_nick_start <= 1)
window->win_nick_start = 0;
gui_buffer_ask_nicklist_refresh (window->buffer, 1);
}
}
}
/*
* gui_window_nicklist_page_down: scroll one page down in nicklist
*/
void
gui_window_nicklist_page_down (struct t_gui_window *window)
{
if (!gui_ok)
return;
if (window->buffer->nicklist)
{
if ((window->buffer->nicklist_visible_count > window->win_nick_num_max)
&& (window->win_nick_start + window->win_nick_num_max - 1
< window->buffer->nicklist_visible_count))
{
if (window->win_nick_start == 0)
window->win_nick_start += (window->win_nick_num_max - 1);
else
window->win_nick_start += (window->win_nick_num_max - 2);
gui_buffer_ask_nicklist_refresh (window->buffer, 1);
}
}
}
/*
* gui_window_nicklist_beginning: go to beginning of nicklist
*/
void
gui_window_nicklist_beginning (struct t_gui_window *window)
{
if (!gui_ok)
return;
@@ -989,11 +1036,11 @@ gui_window_nick_beginning (struct t_gui_window *window)
}
/*
* gui_window_nick_end: go to the end of nicklist
* gui_window_nicklist_end: go to the end of nicklist
*/
void
gui_window_nick_end (struct t_gui_window *window)
gui_window_nicklist_end (struct t_gui_window *window)
{
int new_start;
@@ -1017,53 +1064,6 @@ gui_window_nick_end (struct t_gui_window *window)
}
}
/*
* gui_window_nick_page_up: scroll one page up in nicklist
*/
void
gui_window_nick_page_up (struct t_gui_window *window)
{
if (!gui_ok)
return;
if (window->buffer->nicklist)
{
if (window->win_nick_start > 0)
{
window->win_nick_start -= (window->win_nick_num_max - 1);
if (window->win_nick_start <= 1)
window->win_nick_start = 0;
gui_buffer_ask_nicklist_refresh (window->buffer, 1);
}
}
}
/*
* gui_window_nick_page_down: scroll one page down in nicklist
*/
void
gui_window_nick_page_down (struct t_gui_window *window)
{
if (!gui_ok)
return;
if (window->buffer->nicklist)
{
if ((window->buffer->nicklist_visible_count > window->win_nick_num_max)
&& (window->win_nick_start + window->win_nick_num_max - 1
< window->buffer->nicklist_visible_count))
{
if (window->win_nick_start == 0)
window->win_nick_start += (window->win_nick_num_max - 1);
else
window->win_nick_start += (window->win_nick_num_max - 2);
gui_buffer_ask_nicklist_refresh (window->buffer, 1);
}
}
}
/*
* gui_window_auto_resize: auto-resize all windows, according to % of global size
* This function is called after a terminal resize.
+51 -51
View File
@@ -441,11 +441,58 @@ gui_window_scroll_topic_right (struct t_gui_window *window)
}
/*
* gui_window_nick_beginning: go to beginning of nicklist
* gui_window_nicklist_page_up: scroll one page up in nicklist
*/
void
gui_window_nick_beginning (struct t_gui_window *window)
gui_window_nicklist_page_up (struct t_gui_window *window)
{
if (!gui_ok)
return;
if (window->buffer->nicklist)
{
if (window->win_nick_start > 0)
{
window->win_nick_start -= (window->win_nick_height - 1);
if (window->win_nick_start <= 1)
window->win_nick_start = 0;
gui_nicklist_draw (window->buffer, 1);
}
}
}
/*
* gui_window_nicklist_page_down: scroll one page down in nicklist
*/
void
gui_window_nicklist_page_down (struct t_gui_window *window)
{
if (!gui_ok)
return;
if (window->buffer->nicklist)
{
if ((window->buffer->nicklist_visible_count > window->win_nick_height)
&& (window->win_nick_start + window->win_nick_height - 1
< window->buffer->nicklist_visible_count))
{
if (window->win_nick_start == 0)
window->win_nick_start += (window->win_nick_height - 1);
else
window->win_nick_start += (window->win_nick_height - 2);
gui_nicklist_draw (window->buffer, 1);
}
}
}
/*
* gui_window_nicklist_beginning: go to beginning of nicklist
*/
void
gui_window_nicklist_beginning (struct t_gui_window *window)
{
if (!gui_ok)
return;
@@ -461,11 +508,11 @@ gui_window_nick_beginning (struct t_gui_window *window)
}
/*
* gui_window_nick_end: go to the end of nicklist
* gui_window_nicklist_end: go to the end of nicklist
*/
void
gui_window_nick_end (struct t_gui_window *window)
gui_window_nicklist_end (struct t_gui_window *window)
{
int new_start;
@@ -489,53 +536,6 @@ gui_window_nick_end (struct t_gui_window *window)
}
}
/*
* gui_window_nick_page_up: scroll one page up in nicklist
*/
void
gui_window_nick_page_up (struct t_gui_window *window)
{
if (!gui_ok)
return;
if (window->buffer->nicklist)
{
if (window->win_nick_start > 0)
{
window->win_nick_start -= (window->win_nick_height - 1);
if (window->win_nick_start <= 1)
window->win_nick_start = 0;
gui_nicklist_draw (window->buffer, 1);
}
}
}
/*
* gui_window_nick_page_down: scroll one page down in nicklist
*/
void
gui_window_nick_page_down (struct t_gui_window *window)
{
if (!gui_ok)
return;
if (window->buffer->nicklist)
{
if ((window->buffer->nicklist_visible_count > window->win_nick_height)
&& (window->win_nick_start + window->win_nick_height - 1
< window->buffer->nicklist_visible_count))
{
if (window->win_nick_start == 0)
window->win_nick_start += (window->win_nick_height - 1);
else
window->win_nick_start += (window->win_nick_height - 2);
gui_nicklist_draw (window->buffer, 1);
}
}
}
/*
* gui_window_auto_resize: auto-resize all windows, according to % of global size
* This function is called after a terminal resize.
-243
View File
@@ -931,162 +931,6 @@ gui_action_down_global (char *args)
}
}
/*
* gui_action_page_up: display previous page on buffer
*/
void
gui_action_page_up (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_page_up (gui_current_window);
}
/*
* gui_action_page_down: display next page on buffer
*/
void
gui_action_page_down (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_page_down (gui_current_window);
}
/*
* gui_action_scroll_up: display previous few lines in buffer
*/
void
gui_action_scroll_up (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_scroll_up (gui_current_window);
}
/*
* gui_action_scroll_down: display next few lines in buffer
*/
void
gui_action_scroll_down (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_scroll_down (gui_current_window);
}
/*
* gui_action_scroll_top: scroll to top of buffer
*/
void
gui_action_scroll_top (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_scroll_top (gui_current_window);
}
/*
* gui_action_scroll_bottom: scroll to bottom of buffer
*/
void
gui_action_scroll_bottom (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_scroll_bottom (gui_current_window);
}
/*
* gui_action_scroll_topic_left: scroll left topic
*/
void
gui_action_scroll_topic_left (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_scroll_topic_left (gui_current_window);
}
/*
* gui_action_scroll_topic_right: scroll right topic
*/
void
gui_action_scroll_topic_right (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_scroll_topic_right (gui_current_window);
}
/*
* gui_action_nick_beginning: go to beginning of nicklist
*/
void
gui_action_nick_beginning (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_nick_beginning (gui_current_window);
}
/*
* gui_action_nick_end: go to the end of nicklist
*/
void
gui_action_nick_end (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_nick_end (gui_current_window);
}
/*
* gui_action_nick_page_up: scroll one page up in nicklist
*/
void
gui_action_nick_page_up (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_nick_page_up (gui_current_window);
}
/*
* gui_action_nick_page_down: scroll one page down in nicklist
*/
void
gui_action_nick_page_down (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_nick_page_down (gui_current_window);
}
/*
* gui_action_jump_smart: jump to buffer with activity (alt-A by default)
*/
@@ -1273,80 +1117,6 @@ gui_action_switch_server (char *args)
gui_window_switch_server (gui_current_window);
}
/*
* gui_action_scroll_previous_highlight: scroll to previous highlight
*/
void
gui_action_scroll_previous_highlight (char *args)
{
//t_gui_line *ptr_line;
/* make C compiler happy */
(void) args;
/*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_action_scroll_next_highlight: scroll to next highlight
*/
void
gui_action_scroll_next_highlight (char *args)
{
//t_gui_line *ptr_line;
/* make C compiler happy */
(void) args;
/*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_action_scroll_unread: scroll to first unread line of buffer
*/
@@ -1432,19 +1202,6 @@ gui_action_infobar_clear (char *args)
gui_infobar_draw (gui_current_window->buffer, 1);
}
/*
* gui_action_refresh: refresh screen
*/
void
gui_action_refresh_screen (char *args)
{
/* make C compiler happy */
(void) args;
gui_window_refresh_screen (1);
}
/*
* gui_action_grab_key: init "grab key mode" (next key will be inserted into input buffer)
*/
-30
View File
@@ -102,30 +102,6 @@ struct t_gui_key_function gui_key_functions[] =
N_("call next command in history") },
{ "down_global", gui_action_down_global,
N_("call next command in global history") },
{ "page_up", gui_action_page_up,
N_("scroll one page up") },
{ "page_down", gui_action_page_down,
N_("scroll one page down") },
{ "scroll_up", gui_action_scroll_up,
N_("scroll a few lines up") },
{ "scroll_down", gui_action_scroll_down,
N_("scroll a few lines down") },
{ "scroll_top", gui_action_scroll_top,
N_("scroll to top of buffer") },
{ "scroll_bottom", gui_action_scroll_bottom,
N_("scroll to bottom of buffer") },
{ "scroll_topic_left", gui_action_scroll_topic_left,
N_("scroll left topic") },
{ "scroll_topic_right", gui_action_scroll_topic_right,
N_("scroll right topic") },
{ "nick_beginning", gui_action_nick_beginning,
N_("display beginning of nicklist") },
{ "nick_end", gui_action_nick_end,
N_("display end of nicklist") },
{ "nick_page_up", gui_action_nick_page_up,
N_("scroll nicklist one page up") },
{ "nick_page_down", gui_action_nick_page_down,
N_("scroll nicklist one page down") },
{ "jump_smart", gui_action_jump_smart,
N_("jump to buffer with activity") },
{ "jump_dcc", gui_action_jump_dcc,
@@ -140,10 +116,6 @@ struct t_gui_key_function gui_key_functions[] =
N_("jump to next server") },
{ "switch_server", gui_action_switch_server,
N_("switch active server on servers buffer") },
{ "scroll_previous_highlight", gui_action_scroll_previous_highlight,
N_("scroll to previous highlight in buffer") },
{ "scroll_next_highlight", gui_action_scroll_next_highlight,
N_("scroll to next highlight in buffer") },
{ "scroll_unread", gui_action_scroll_unread,
N_("scroll to first unread line in buffer") },
{ "set_unread", gui_action_set_unread,
@@ -152,8 +124,6 @@ struct t_gui_key_function gui_key_functions[] =
N_("clear hotlist") },
{ "infobar_clear", gui_action_infobar_clear,
N_("clear infobar") },
{ "refresh", gui_action_refresh_screen,
N_("refresh screen") },
{ "grab_key", gui_action_grab_key,
N_("grab a key") },
{ "insert", gui_action_insert_string,
+72
View File
@@ -680,6 +680,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
*/
+6 -4
View File
@@ -138,6 +138,8 @@ extern void gui_window_switch_next (struct t_gui_window *window);
extern void gui_window_switch_by_buffer (struct t_gui_window *window,
int buffer_number);
extern void gui_window_scroll (struct t_gui_window *window, char *scroll);
extern void gui_window_scroll_previous_highlight (struct t_gui_window *window);
extern void gui_window_scroll_next_highlight (struct t_gui_window *window);
extern void gui_window_search_start (struct t_gui_window *window);
extern void gui_window_search_restart (struct t_gui_window *window);
extern void gui_window_search_stop (struct t_gui_window *window);
@@ -167,10 +169,10 @@ extern void gui_window_scroll_top (struct t_gui_window *window);
extern void gui_window_scroll_bottom (struct t_gui_window *window);
extern void gui_window_scroll_topic_left (struct t_gui_window *window);
extern void gui_window_scroll_topic_right (struct t_gui_window *window);
extern void gui_window_nick_beginning (struct t_gui_window *window);
extern void gui_window_nick_end (struct t_gui_window *window);
extern void gui_window_nick_page_up (struct t_gui_window *window);
extern void gui_window_nick_page_down (struct t_gui_window *window);
extern void gui_window_nicklist_page_up (struct t_gui_window *window);
extern void gui_window_nicklist_page_down (struct t_gui_window *window);
extern void gui_window_nicklist_beginning (struct t_gui_window *window);
extern void gui_window_nicklist_end (struct t_gui_window *window);
extern void gui_window_init_subwindows (struct t_gui_window *window);
extern void gui_window_refresh_windows ();
extern void gui_window_split_horiz (struct t_gui_window *window,