1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 10:43:13 +02:00

core: add key alt+backspace, change behavior of key ctrl+w (closes #559)

The key ctrl+w now deletes one word until whitespace.

The new key alt+backspace deletes one word (same behavior as ctrl+w in previous
releases).
This commit is contained in:
Sébastien Helleu
2022-09-18 23:26:49 +02:00
parent d7c0e896b2
commit 01cf98e8fb
45 changed files with 1528 additions and 320 deletions
+14
View File
@@ -1109,6 +1109,20 @@ string_convert_escaped_chars (const char *string)
return output;
}
/*
* Checks if first char of string is a whitespace (space or tab).
*
* Returns:
* 1: first char is whitespace
* 0: first char is not whitespace
*/
int
string_is_whitespace_char (const char *string)
{
return (string && ((string[0] == ' ') || string[0] == '\t')) ? 1 : 0;
}
/*
* Checks if first char of string is a "word char".
*