GUACAMOLE-1961: Detect accented letters as a part of word.
This commit is contained in:
parent
d328610473
commit
2edcd055bd
@ -1607,7 +1607,7 @@ int guac_terminal_send_key(guac_terminal* term, int keysym, int pressed) {
|
||||
|
||||
/**
|
||||
* Determines if the given character is part of a word.
|
||||
* Match these chars :[0-9A-Za-z\$\-\.\/_~]
|
||||
* Match these chars :[0-9A-Za-z\$\-\.\/_~] and accented letters.
|
||||
* This allows a path, variable name or IP address to be treated as a word.
|
||||
*
|
||||
* @param ascii_char
|
||||
@ -1621,6 +1621,8 @@ static bool guac_terminal_is_part_of_word(int ascii_char) {
|
||||
return ((ascii_char >= '0' && ascii_char <= '9') ||
|
||||
(ascii_char >= 'A' && ascii_char <= 'Z') ||
|
||||
(ascii_char >= 'a' && ascii_char <= 'z') ||
|
||||
(ascii_char >= GUAC_TERMINAL_LATIN1_CAPITAL_AGRAVE &&
|
||||
ascii_char <= GUAC_TERMINAL_LATIN1_Y_UMLAUT) ||
|
||||
(ascii_char == '$') ||
|
||||
(ascii_char == '-') ||
|
||||
(ascii_char == '.') ||
|
||||
|
||||
@ -111,6 +111,16 @@
|
||||
*/
|
||||
#define GUAC_TERMINAL_PIPE_AUTOFLUSH 2
|
||||
|
||||
/**
|
||||
* Latin 1 capital A grave, it's the first character of the accented range.
|
||||
*/
|
||||
#define GUAC_TERMINAL_LATIN1_CAPITAL_AGRAVE 192
|
||||
|
||||
/**
|
||||
* Latin 1 small y umlaut, it's the latest character of the accented range.
|
||||
*/
|
||||
#define GUAC_TERMINAL_LATIN1_Y_UMLAUT 255
|
||||
|
||||
/**
|
||||
* Represents a terminal emulator which uses a given Guacamole client to
|
||||
* render itself.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user