Ticket #4248: add alacritty to known terminals.

Alacritty is a "fast, cross-platform, OpenGL terminal emulator" (see
https://github.com/alacritty/alacritty). Add its default TERM value to
the recognized ones. This enables mc to change window title and handle
mouse events.

(tty_check_term): add support of alacritty terminal as xterm-compatible.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Grzegorz Szymaszek 2021-05-25 16:26:30 +02:00 committed by Andrew Borodin
parent e4195219fd
commit 2f3d59db36

View File

@ -92,7 +92,7 @@ sigintr_handler (int signo)
* @param force_xterm Set forced the XTerm type
*
* @return true if @param force_xterm is true or value of $TERM is one of term*, konsole*
* rxvt*, Eterm or dtterm
* rxvt*, Eterm, dtterm or alacritty
*/
gboolean
tty_check_term (gboolean force_xterm)
@ -116,6 +116,7 @@ tty_check_term (gboolean force_xterm)
|| strncmp (termvalue, "rxvt", 4) == 0
|| strcmp (termvalue, "Eterm") == 0
|| strcmp (termvalue, "dtterm") == 0
|| strncmp (termvalue, "alacritty", 9) == 0
|| (strncmp (termvalue, "screen", 6) == 0 && xdisplay != NULL);
}