mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 17:53:13 +02:00
Fix buffer used by some input functions called via plugin API with buffer pointer (bug #28152)
This commit is contained in:
@@ -15,6 +15,8 @@ Version 0.3.1 (under dev!)
|
||||
* core: fix plural form in translation files (bug #27430)
|
||||
* core: fix terminal title bug: do not reset it when option
|
||||
weechat.look.set_title is off (bug #27399)
|
||||
* core: fix buffer used by some input functions called via plugin API with
|
||||
buffer pointer (bug #28152)
|
||||
* alias: new expansions for alias arguments ($n, $-m, $n-, $n-m, $*, $~)
|
||||
(patch #6917)
|
||||
* alias: allow use of wildcards for /alias list (patch #6925)
|
||||
|
||||
+35
-35
@@ -868,7 +868,7 @@ command_buffer (void *data, struct t_gui_buffer *buffer,
|
||||
&& (CONFIG_BOOLEAN(config_look_jump_current_to_previous_buffer))
|
||||
&& gui_buffers_visited)
|
||||
{
|
||||
gui_input_jump_previously_visited_buffer ();
|
||||
gui_input_jump_previously_visited_buffer (gui_current_window);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1786,77 +1786,77 @@ command_input (void *data, struct t_gui_buffer *buffer,
|
||||
if (argc > 1)
|
||||
{
|
||||
if (string_strcasecmp (argv[1], "return") == 0)
|
||||
gui_input_return ();
|
||||
gui_input_return (gui_current_window);
|
||||
else if (string_strcasecmp (argv[1], "complete_next") == 0)
|
||||
gui_input_complete_next ();
|
||||
gui_input_complete_next (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "complete_previous") == 0)
|
||||
gui_input_complete_previous ();
|
||||
gui_input_complete_previous (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "search_text") == 0)
|
||||
gui_input_search_text ();
|
||||
gui_input_search_text (gui_current_window);
|
||||
else if (string_strcasecmp (argv[1], "delete_previous_char") == 0)
|
||||
gui_input_delete_previous_char ();
|
||||
gui_input_delete_previous_char (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "delete_next_char") == 0)
|
||||
gui_input_delete_next_char ();
|
||||
gui_input_delete_next_char (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "delete_previous_word") == 0)
|
||||
gui_input_delete_previous_word ();
|
||||
gui_input_delete_previous_word (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "delete_next_word") == 0)
|
||||
gui_input_delete_next_word ();
|
||||
gui_input_delete_next_word (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "delete_beginning_of_line") == 0)
|
||||
gui_input_delete_beginning_of_line ();
|
||||
gui_input_delete_beginning_of_line (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "delete_end_of_line") == 0)
|
||||
gui_input_delete_end_of_line ();
|
||||
gui_input_delete_end_of_line (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "delete_line") == 0)
|
||||
gui_input_delete_line ();
|
||||
gui_input_delete_line (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "clipboard_paste") == 0)
|
||||
gui_input_clipboard_paste ();
|
||||
gui_input_clipboard_paste (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "transpose_chars") == 0)
|
||||
gui_input_transpose_chars ();
|
||||
gui_input_transpose_chars (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "move_beginning_of_line") == 0)
|
||||
gui_input_move_beginning_of_line ();
|
||||
gui_input_move_beginning_of_line (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "move_end_of_line") == 0)
|
||||
gui_input_move_end_of_line ();
|
||||
gui_input_move_end_of_line (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "move_previous_char") == 0)
|
||||
gui_input_move_previous_char ();
|
||||
gui_input_move_previous_char (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "move_next_char") == 0)
|
||||
gui_input_move_next_char ();
|
||||
gui_input_move_next_char (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "move_previous_word") == 0)
|
||||
gui_input_move_previous_word ();
|
||||
gui_input_move_previous_word (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "move_next_word") == 0)
|
||||
gui_input_move_next_word ();
|
||||
gui_input_move_next_word (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "history_previous") == 0)
|
||||
gui_input_history_previous ();
|
||||
gui_input_history_previous (gui_current_window);
|
||||
else if (string_strcasecmp (argv[1], "history_next") == 0)
|
||||
gui_input_history_next ();
|
||||
gui_input_history_next (gui_current_window);
|
||||
else if (string_strcasecmp (argv[1], "history_global_previous") == 0)
|
||||
gui_input_history_global_previous ();
|
||||
gui_input_history_global_previous (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "history_global_next") == 0)
|
||||
gui_input_history_global_next ();
|
||||
gui_input_history_global_next (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "jump_smart") == 0)
|
||||
gui_input_jump_smart ();
|
||||
gui_input_jump_smart (gui_current_window);
|
||||
else if (string_strcasecmp (argv[1], "jump_last_buffer") == 0)
|
||||
gui_input_jump_last_buffer ();
|
||||
gui_input_jump_last_buffer (gui_current_window);
|
||||
else if (string_strcasecmp (argv[1], "jump_previously_visited_buffer") == 0)
|
||||
gui_input_jump_previously_visited_buffer ();
|
||||
gui_input_jump_previously_visited_buffer (gui_current_window);
|
||||
else if (string_strcasecmp (argv[1], "jump_next_visited_buffer") == 0)
|
||||
gui_input_jump_next_visited_buffer ();
|
||||
gui_input_jump_next_visited_buffer (gui_current_window);
|
||||
else if (string_strcasecmp (argv[1], "hotlist_clear") == 0)
|
||||
gui_input_hotlist_clear ();
|
||||
gui_input_hotlist_clear (gui_current_window);
|
||||
else if (string_strcasecmp (argv[1], "grab_key") == 0)
|
||||
gui_input_grab_key ();
|
||||
gui_input_grab_key (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "grab_key_command") == 0)
|
||||
gui_input_grab_key_command ();
|
||||
gui_input_grab_key_command (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "scroll_unread") == 0)
|
||||
gui_input_scroll_unread ();
|
||||
gui_input_scroll_unread (gui_current_window);
|
||||
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 ();
|
||||
gui_input_set_unread_buffer (gui_current_window->buffer);
|
||||
else if (string_strcasecmp (argv[1], "switch_active_buffer") == 0)
|
||||
gui_input_switch_active_buffer ();
|
||||
gui_input_switch_active_buffer (gui_current_window);
|
||||
else if (string_strcasecmp (argv[1], "insert") == 0)
|
||||
{
|
||||
if (argc > 2)
|
||||
gui_input_insert (argv_eol[2]);
|
||||
gui_input_insert (gui_current_window->buffer, argv_eol[2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+332
-359
File diff suppressed because it is too large
Load Diff
+35
-34
@@ -21,6 +21,7 @@
|
||||
#define __WEECHAT_GUI_INPUT_H 1
|
||||
|
||||
struct t_gui_buffer;
|
||||
struct t_gui_window;
|
||||
|
||||
/* input variables */
|
||||
|
||||
@@ -34,40 +35,40 @@ extern void gui_input_move (struct t_gui_buffer *buffer, char *target,
|
||||
const char *source, int size);
|
||||
extern int gui_input_insert_string (struct t_gui_buffer *buffer,
|
||||
const char *string, int pos);
|
||||
extern void gui_input_return ();
|
||||
extern void gui_input_clipboard_paste ();
|
||||
extern void gui_input_complete_next ();
|
||||
extern void gui_input_complete_previous ();
|
||||
extern void gui_input_search_text ();
|
||||
extern void gui_input_delete_previous_char ();
|
||||
extern void gui_input_delete_next_char ();
|
||||
extern void gui_input_delete_previous_word ();
|
||||
extern void gui_input_delete_next_word ();
|
||||
extern void gui_input_delete_beginning_of_line ();
|
||||
extern void gui_input_delete_end_of_line ();
|
||||
extern void gui_input_delete_line ();
|
||||
extern void gui_input_transpose_chars ();
|
||||
extern void gui_input_move_beginning_of_line ();
|
||||
extern void gui_input_move_end_of_line ();
|
||||
extern void gui_input_move_previous_char ();
|
||||
extern void gui_input_move_next_char ();
|
||||
extern void gui_input_move_previous_word ();
|
||||
extern void gui_input_move_next_word ();
|
||||
extern void gui_input_history_previous ();
|
||||
extern void gui_input_history_next ();
|
||||
extern void gui_input_history_global_previous ();
|
||||
extern void gui_input_history_global_next ();
|
||||
extern void gui_input_jump_smart ();
|
||||
extern void gui_input_jump_last_buffer ();
|
||||
extern void gui_input_jump_previously_visited_buffer ();
|
||||
extern void gui_input_jump_next_visited_buffer ();
|
||||
extern void gui_input_hotlist_clear ();
|
||||
extern void gui_input_grab_key ();
|
||||
extern void gui_input_grab_key_command ();
|
||||
extern void gui_input_scroll_unread ();
|
||||
extern void gui_input_clipboard_paste (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_return (struct t_gui_window *window);
|
||||
extern void gui_input_complete_next (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_complete_previous (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_search_text (struct t_gui_window *window);
|
||||
extern void gui_input_delete_previous_char (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_delete_next_char (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_delete_previous_word (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_delete_next_word (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_delete_beginning_of_line (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_delete_end_of_line (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_delete_line (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_transpose_chars (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_move_beginning_of_line (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_move_end_of_line (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_move_previous_char (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_move_next_char (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_move_previous_word (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_move_next_word (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_history_previous (struct t_gui_window *window);
|
||||
extern void gui_input_history_next (struct t_gui_window *window);
|
||||
extern void gui_input_history_global_previous (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_history_global_next (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_jump_smart (struct t_gui_window *window);
|
||||
extern void gui_input_jump_last_buffer (struct t_gui_window *window);
|
||||
extern void gui_input_jump_previously_visited_buffer (struct t_gui_window *window);
|
||||
extern void gui_input_jump_next_visited_buffer (struct t_gui_window *window);
|
||||
extern void gui_input_hotlist_clear (struct t_gui_window *window);
|
||||
extern void gui_input_grab_key (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_grab_key_command (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_scroll_unread (struct t_gui_window *window);
|
||||
extern void gui_input_set_unread ();
|
||||
extern void gui_input_set_unread_current_buffer ();
|
||||
extern void gui_input_switch_active_buffer ();
|
||||
extern void gui_input_insert ();
|
||||
extern void gui_input_set_unread_buffer (struct t_gui_buffer *buffer);
|
||||
extern void gui_input_switch_active_buffer (struct t_gui_window *window);
|
||||
extern void gui_input_insert (struct t_gui_buffer *buffer, const char *args);
|
||||
|
||||
#endif /* gui-input.h */
|
||||
|
||||
Reference in New Issue
Block a user