mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 19:23:13 +02:00
core: add mouse support (task #5435), free cursor movement, hook_focus, fix bugs with key "^" (bug #32072, bug #21381), fix bugs with bar windows, completion and /buffer
New features and bugs fixed: - mouse support: new command /mouse, new option weechat.look.mouse, new key context "mouse" - free movement of cursor: new command /cursor, new key context "cursor" - new hook_focus (used by cursor and mouse) - info "cursor_mode" - bugs fixed with key "^" - allow plugin name in /buffer name - fix bugs with bar windows: do not create bar windows for hidden bars - fix completion bug when two words for completion are equal but with different case - automatic scroll direction in /bar scroll (x/y is now optional)
This commit is contained in:
@@ -45,11 +45,13 @@
|
||||
#include "../plugins/plugin.h"
|
||||
#include "../gui/gui-completion.h"
|
||||
#include "../gui/gui-bar.h"
|
||||
#include "../gui/gui-bar-window.h"
|
||||
#include "../gui/gui-buffer.h"
|
||||
#include "../gui/gui-color.h"
|
||||
#include "../gui/gui-filter.h"
|
||||
#include "../gui/gui-key.h"
|
||||
#include "../gui/gui-nicklist.h"
|
||||
#include "../gui/gui-window.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -1225,6 +1227,47 @@ completion_list_add_keys_codes_for_reset_cb (void *data,
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_list_add_cursor_areas_cb: add areas for free cursor movement
|
||||
* ("chat" and bar names)
|
||||
*/
|
||||
|
||||
int
|
||||
completion_list_add_cursor_areas_cb (void *data,
|
||||
const char *completion_item,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
struct t_gui_bar_window *ptr_bar_win;
|
||||
struct t_gui_bar *ptr_bar;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) completion_item;
|
||||
(void) buffer;
|
||||
|
||||
/* add "chat" for chat area */
|
||||
gui_completion_list_add (completion, "chat", 0, WEECHAT_LIST_POS_SORT);
|
||||
|
||||
/* add bar windows (of current window) */
|
||||
for (ptr_bar_win = gui_current_window->bar_windows; ptr_bar_win;
|
||||
ptr_bar_win = ptr_bar_win->next_bar_window)
|
||||
{
|
||||
gui_completion_list_add (completion, ptr_bar_win->bar->name,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
|
||||
{
|
||||
if (ptr_bar->bar_window)
|
||||
{
|
||||
gui_completion_list_add (completion, ptr_bar->name,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_init: add hooks for completions done by WeeChat core
|
||||
*/
|
||||
@@ -1311,4 +1354,7 @@ completion_init ()
|
||||
N_("key codes that can be reset (keys added, redefined "
|
||||
"or removed)"),
|
||||
&completion_list_add_keys_codes_for_reset_cb, NULL);
|
||||
hook_completion (NULL, "cursor_areas",
|
||||
N_("areas (\"chat\" or bar name) for free cursor movement"),
|
||||
&completion_list_add_cursor_areas_cb, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user