summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-command.c2
-rw-r--r--src/gui/gui-input.c15
-rw-r--r--src/gui/gui-input.h1
3 files changed, 18 insertions, 0 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index 6a258fdd3..3ca29a587 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -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)
diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c
index a0544e601..dc4bd2887 100644
--- a/src/gui/gui-input.c
+++ b/src/gui/gui-input.c
@@ -1324,6 +1324,21 @@ gui_input_set_unread ()
}
/*
+ * 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)
*/
diff --git a/src/gui/gui-input.h b/src/gui/gui-input.h
index 17fd6a573..0182e8651 100644
--- a/src/gui/gui-input.h
+++ b/src/gui/gui-input.h
@@ -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) */