summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-05-11 11:40:23 +0200
committerSebastien Helleu <flashcode@flashtux.org>2008-05-11 11:40:23 +0200
commit2b1dec16795f9782a0c0e7644b19ef17d4feed98 (patch)
treea32371a110aeca64be7d1a0dbaa481fce683034f /src/gui
parent7871b62ef881370e3126b9459441711cfdd7b05b (diff)
downloadweechat-2b1dec16795f9782a0c0e7644b19ef17d4feed98.zip
New input action "set_unread_current_buffer" to set unread marker for current buffer only (task #7286)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-input.c15
-rw-r--r--src/gui/gui-input.h1
2 files changed, 16 insertions, 0 deletions
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) */