mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
core: consider all keys are safe in cursor context (closes #2244)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
### Fixed
|
||||
|
||||
- core: consider all keys are safe in cursor context ([#2244](https://github.com/weechat/weechat/issues/2244))
|
||||
- irc: display nick changes and quit messages when option irc.look.ignore_tag_messages is enabled ([#2241](https://github.com/weechat/weechat/issues/2241))
|
||||
- perl: fix build when multiplicity is not available ([#2243](https://github.com/weechat/weechat/issues/2243))
|
||||
|
||||
|
||||
+10
-10
@@ -1215,12 +1215,12 @@ gui_key_set_score (struct t_gui_key *key)
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if a key is safe or not: a safe key begins always with the "meta" or
|
||||
* "ctrl" code (except "@" allowed in cursor/mouse contexts).
|
||||
* Checks if a key is safe or not: a safe key should begin with the "meta" or
|
||||
* "ctrl" code (there are exceptions).
|
||||
*
|
||||
* Returns:
|
||||
* 1: key is safe
|
||||
* 0: key is NOT safe
|
||||
* 1: key is safe for the given context
|
||||
* 0: key is NOT safe for the given context
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -1231,13 +1231,13 @@ gui_key_is_safe (int context, const char *key)
|
||||
if (!key || !key[0])
|
||||
return 0;
|
||||
|
||||
/* "@" is allowed at beginning for cursor/mouse contexts */
|
||||
if ((key[0] == '@')
|
||||
&& ((context == GUI_KEY_CONTEXT_CURSOR)
|
||||
|| (context == GUI_KEY_CONTEXT_MOUSE)))
|
||||
{
|
||||
/* all keys are safe in cursor mode */
|
||||
if (context == GUI_KEY_CONTEXT_CURSOR)
|
||||
return 1;
|
||||
|
||||
/* "@" is allowed at beginning for mouse context */
|
||||
if ((key[0] == '@') && (context == GUI_KEY_CONTEXT_MOUSE))
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strncmp (key, "comma", 5) == 0)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user