mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 08:13:14 +02:00
New input action "set_unread_current_buffer" to set unread marker for current buffer only (task #7286)
This commit is contained in:
@@ -1201,6 +1201,8 @@ command_input (void *data, struct t_gui_buffer *buffer,
|
||||
gui_input_scroll_unread ();
|
||||
else if (string_strcasecmp (argv[1], "set_unread") == 0)
|
||||
gui_input_set_unread ();
|
||||
else if (string_strcasecmp (argv[1], "set_unread_current_buffer") == 0)
|
||||
gui_input_set_unread_current_buffer ();
|
||||
else if (string_strcasecmp (argv[1], "insert") == 0)
|
||||
{
|
||||
if (argc > 2)
|
||||
|
||||
@@ -1323,6 +1323,21 @@ gui_input_set_unread ()
|
||||
gui_window_redraw_all_buffers ();
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_input_set_unread_current_buffer: set unread marker for current buffer
|
||||
*/
|
||||
|
||||
void
|
||||
gui_input_set_unread_current_buffer ()
|
||||
{
|
||||
if (gui_current_window
|
||||
&& (gui_current_window->buffer->type == GUI_BUFFER_TYPE_FORMATED))
|
||||
gui_current_window->buffer->last_read_line = gui_current_window->buffer->last_line;
|
||||
|
||||
/* refresh all windows */
|
||||
gui_window_redraw_buffer (gui_current_window->buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_input_insert: insert a string in command line
|
||||
* (many default keys are bound to this function)
|
||||
|
||||
@@ -66,6 +66,7 @@ extern void gui_input_infobar_clear ();
|
||||
extern void gui_input_grab_key ();
|
||||
extern void gui_input_scroll_unread ();
|
||||
extern void gui_input_set_unread ();
|
||||
extern void gui_input_set_unread_current_buffer ();
|
||||
extern void gui_input_insert ();
|
||||
|
||||
/* input functions (GUI dependent) */
|
||||
|
||||
Reference in New Issue
Block a user