summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-08-31 22:32:38 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-08-31 22:32:38 +0200
commit12be3b8c332c75a398f77478fd8d62304c632a1e (patch)
treea8c49b9277d308372d02cb17d6583d1a27d54c41 /src/core
parent5b5626a82ba5bf1418817f94c386cf436f71e008 (diff)
downloadweechat-12be3b8c332c75a398f77478fd8d62304c632a1e.zip
core: add options in command /input and new keys to remove/restore buffers in hotlist
New options in command /input: - hotlist_remove_buffer - hotlist_restore_buffer - hotlist_restore_all New keys: - alt+h, alt+c: clear the whole hotlist (former key: alt+h) - alt+h, alt+m: mark the current buffer as read by removing it from the hotlist - alt+h, alt+r: restore latest hotlist removed in the current buffer - alt+h, alt+shift+R: restore latest hotlist removed in all buffers
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-command.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index beacd126f..9142dc5f2 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -3329,6 +3329,12 @@ COMMAND_CALLBACK(input)
gui_input_jump_next_visited_buffer (buffer);
else if (string_strcasecmp (argv[1], "hotlist_clear") == 0)
gui_input_hotlist_clear (buffer, (argc > 2) ? argv[2] : NULL);
+ else if (string_strcasecmp (argv[1], "hotlist_remove_buffer") == 0)
+ gui_input_hotlist_remove_buffer (buffer);
+ else if (string_strcasecmp (argv[1], "hotlist_restore_buffer") == 0)
+ gui_input_hotlist_restore_buffer (buffer);
+ else if (string_strcasecmp (argv[1], "hotlist_restore_all") == 0)
+ gui_input_hotlist_restore_all ();
else if (string_strcasecmp (argv[1], "grab_key") == 0)
gui_input_grab_key (buffer, 0, (argc > 2) ? argv[2] : NULL);
else if (string_strcasecmp (argv[1], "grab_key_command") == 0)
@@ -7815,6 +7821,11 @@ command_init ()
"clear only lowest level in hotlist, \"highest\" to clear only "
"highest level in hotlist, or level mask: integer which is a "
"combination of 1=join/part, 2=message, 4=private, 8=highlight)\n"
+ " hotlist_remove_buffer: remove current buffer from hotlist\n"
+ " hotlist_restore_buffer: restore latest hotlist removed in the "
+ "current buffer\n"
+ " hotlist_restore_all: restore latest hotlist removed in all "
+ "buffers\n"
" grab_key: grab a key (optional argument: delay for end of grab, "
"default is 500 milliseconds)\n"
" grab_key_command: grab a key with its associated command (optional "
@@ -7846,10 +7857,11 @@ command_init ()
"history_global_next || jump_smart || jump_last_buffer_displayed || "
"jump_previously_visited_buffer || jump_next_visited_buffer || "
"hotlist_clear 1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|lowest|highest || "
- "grab_key || grab_key_command || grab_mouse || grab_mouse_area || "
- "set_unread || set_unread_current_buffer || switch_active_buffer || "
- "switch_active_buffer_previous || zoom_merged_buffer || insert || "
- "send || paste_start || paste_stop",
+ "hotlist_remove_buffer || hotlist_restore_buffer || "
+ "hotlist_restore_all || grab_key || grab_key_command || grab_mouse || "
+ "grab_mouse_area || set_unread || set_unread_current_buffer || "
+ "switch_active_buffer || switch_active_buffer_previous || "
+ "zoom_merged_buffer || insert || send || paste_start || paste_stop",
&command_input, NULL, NULL);
hook_command (
NULL, "key",