Avoid non-working tab-moves on Linux terminals with PC or VT100 encoding
This commit is contained in:
parent
386e91563a
commit
2c8d58f803
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,7 @@
|
||||||
|
2016-12-27 Markus Gans <guru.mail@muenster.de>
|
||||||
|
* Avoid non-working tab-cursor-movements on Linux terminals
|
||||||
|
with activated PC or VT100 encoding
|
||||||
|
|
||||||
2016-12-26 Markus Gans <guru.mail@muenster.de>
|
2016-12-26 Markus Gans <guru.mail@muenster.de>
|
||||||
* Add the ability to stream text into a widget's virtual window
|
* Add the ability to stream text into a widget's virtual window
|
||||||
with print() << '#' << 5; or *this << ...
|
with print() << '#' << 5; or *this << ...
|
||||||
|
@ -39,7 +43,7 @@
|
||||||
* Improve tty settings
|
* Improve tty settings
|
||||||
|
|
||||||
2016-11-13 Markus Gans <guru.mail@muenster.de>
|
2016-11-13 Markus Gans <guru.mail@muenster.de>
|
||||||
* Do not draw shadows on a linux console if not
|
* Do not draw shadows on a Linux console if not
|
||||||
all characters are available
|
all characters are available
|
||||||
|
|
||||||
2016-11-12 Markus Gans <guru.mail@muenster.de>
|
2016-11-12 Markus Gans <guru.mail@muenster.de>
|
||||||
|
@ -154,7 +158,7 @@
|
||||||
* An incorrect parameter can now return an error message
|
* An incorrect parameter can now return an error message
|
||||||
on program exit
|
on program exit
|
||||||
* Termcap S2 and S3 fallback only for the vte/gnome-terminal
|
* Termcap S2 and S3 fallback only for the vte/gnome-terminal
|
||||||
and the linux terminal
|
and the Linux terminal
|
||||||
|
|
||||||
2016-08-27 Markus Gans <guru.mail@muenster.de>
|
2016-08-27 Markus Gans <guru.mail@muenster.de>
|
||||||
* A new inherit background option for characters
|
* A new inherit background option for characters
|
||||||
|
@ -204,7 +208,7 @@
|
||||||
* Improved window focus behavior
|
* Improved window focus behavior
|
||||||
|
|
||||||
2016-07-23 Markus Gans <guru.mail@muenster.de>
|
2016-07-23 Markus Gans <guru.mail@muenster.de>
|
||||||
* Add a modifier key correction for the linux tty
|
* Add a modifier key correction for the Linux tty
|
||||||
* Support to read meta+enter from keyboard
|
* Support to read meta+enter from keyboard
|
||||||
|
|
||||||
2016-07-16 Markus Gans <guru.mail@muenster.de>
|
2016-07-16 Markus Gans <guru.mail@muenster.de>
|
||||||
|
|
|
@ -85,7 +85,11 @@ int FOptiMove::set_cursor_home (char*& cap)
|
||||||
F_cursor_home.length = capDurationToLength (F_cursor_home.duration);
|
F_cursor_home.length = capDurationToLength (F_cursor_home.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_cursor_home.duration = LONG_DURATION;
|
{
|
||||||
|
F_cursor_home.cap = 0;
|
||||||
|
F_cursor_home.duration = \
|
||||||
|
F_cursor_home.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_cursor_home.length;
|
return F_cursor_home.length;
|
||||||
}
|
}
|
||||||
|
@ -100,7 +104,11 @@ int FOptiMove::set_cursor_to_ll (char*& cap)
|
||||||
F_cursor_to_ll.length = capDurationToLength (F_cursor_to_ll.duration);
|
F_cursor_to_ll.length = capDurationToLength (F_cursor_to_ll.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_cursor_to_ll.duration = LONG_DURATION;
|
{
|
||||||
|
F_cursor_to_ll.cap = 0;
|
||||||
|
F_cursor_to_ll.duration = \
|
||||||
|
F_cursor_to_ll.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_cursor_to_ll.length;
|
return F_cursor_to_ll.length;
|
||||||
}
|
}
|
||||||
|
@ -115,7 +123,11 @@ int FOptiMove::set_carriage_return (char*& cap)
|
||||||
F_carriage_return.length = capDurationToLength (F_carriage_return.duration);
|
F_carriage_return.length = capDurationToLength (F_carriage_return.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_carriage_return.duration = LONG_DURATION;
|
{
|
||||||
|
F_carriage_return.cap = 0;
|
||||||
|
F_carriage_return.duration = \
|
||||||
|
F_carriage_return.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_carriage_return.length;
|
return F_carriage_return.length;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +142,11 @@ int FOptiMove::set_tabular (char*& cap)
|
||||||
F_tab.length = capDurationToLength (F_tab.duration);
|
F_tab.length = capDurationToLength (F_tab.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_tab.duration = LONG_DURATION;
|
{
|
||||||
|
F_tab.cap = 0;
|
||||||
|
F_tab.duration = \
|
||||||
|
F_tab.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_tab.length;
|
return F_tab.length;
|
||||||
}
|
}
|
||||||
|
@ -145,7 +161,11 @@ int FOptiMove::set_back_tab (char*& cap)
|
||||||
F_back_tab.length = capDurationToLength (F_back_tab.duration);
|
F_back_tab.length = capDurationToLength (F_back_tab.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_back_tab.duration = LONG_DURATION;
|
{
|
||||||
|
F_back_tab.cap = 0;
|
||||||
|
F_back_tab.duration = \
|
||||||
|
F_back_tab.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_back_tab.length;
|
return F_back_tab.length;
|
||||||
}
|
}
|
||||||
|
@ -160,7 +180,11 @@ int FOptiMove::set_cursor_up (char*& cap)
|
||||||
F_cursor_up.length = capDurationToLength (F_cursor_up.duration);
|
F_cursor_up.length = capDurationToLength (F_cursor_up.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_cursor_up.duration = LONG_DURATION;
|
{
|
||||||
|
F_cursor_up.cap = 0;
|
||||||
|
F_cursor_up.duration = \
|
||||||
|
F_cursor_up.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_cursor_up.length;
|
return F_cursor_up.length;
|
||||||
}
|
}
|
||||||
|
@ -175,7 +199,11 @@ int FOptiMove::set_cursor_down (char*& cap)
|
||||||
F_cursor_down.length = capDurationToLength (F_cursor_down.duration);
|
F_cursor_down.length = capDurationToLength (F_cursor_down.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_cursor_down.duration = LONG_DURATION;
|
{
|
||||||
|
F_cursor_down.cap = 0;
|
||||||
|
F_cursor_down.duration = \
|
||||||
|
F_cursor_down.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_cursor_down.length;
|
return F_cursor_down.length;
|
||||||
}
|
}
|
||||||
|
@ -190,7 +218,11 @@ int FOptiMove::set_cursor_left (char*& cap)
|
||||||
F_cursor_left.length = capDurationToLength (F_cursor_left.duration);
|
F_cursor_left.length = capDurationToLength (F_cursor_left.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_cursor_left.duration = LONG_DURATION;
|
{
|
||||||
|
F_cursor_left.cap = 0;
|
||||||
|
F_cursor_left.duration = \
|
||||||
|
F_cursor_left.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_cursor_left.length;
|
return F_cursor_left.length;
|
||||||
}
|
}
|
||||||
|
@ -205,7 +237,11 @@ int FOptiMove::set_cursor_right (char*& cap)
|
||||||
F_cursor_right.length = capDurationToLength (F_cursor_right.duration);
|
F_cursor_right.length = capDurationToLength (F_cursor_right.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_cursor_right.duration = LONG_DURATION;
|
{
|
||||||
|
F_cursor_right.cap = 0;
|
||||||
|
F_cursor_right.duration = \
|
||||||
|
F_cursor_right.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_cursor_right.length;
|
return F_cursor_right.length;
|
||||||
}
|
}
|
||||||
|
@ -221,7 +257,11 @@ int FOptiMove::set_cursor_address (char*& cap)
|
||||||
F_cursor_address.length = capDurationToLength (F_cursor_address.duration);
|
F_cursor_address.length = capDurationToLength (F_cursor_address.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_cursor_address.duration = LONG_DURATION;
|
{
|
||||||
|
F_cursor_address.cap = 0;
|
||||||
|
F_cursor_address.duration = \
|
||||||
|
F_cursor_address.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_cursor_address.length;
|
return F_cursor_address.length;
|
||||||
}
|
}
|
||||||
|
@ -237,7 +277,11 @@ int FOptiMove::set_column_address (char*& cap)
|
||||||
F_column_address.length = capDurationToLength (F_column_address.duration);
|
F_column_address.length = capDurationToLength (F_column_address.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_column_address.duration = LONG_DURATION;
|
{
|
||||||
|
F_column_address.cap = 0;
|
||||||
|
F_column_address.duration = \
|
||||||
|
F_column_address.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_column_address.length;
|
return F_column_address.length;
|
||||||
}
|
}
|
||||||
|
@ -253,7 +297,11 @@ int FOptiMove::set_row_address (char*& cap)
|
||||||
F_row_address.length = capDurationToLength (F_row_address.duration);
|
F_row_address.length = capDurationToLength (F_row_address.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_row_address.duration = LONG_DURATION;
|
{
|
||||||
|
F_row_address.cap = 0;
|
||||||
|
F_row_address.duration = \
|
||||||
|
F_row_address.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_row_address.length;
|
return F_row_address.length;
|
||||||
}
|
}
|
||||||
|
@ -269,7 +317,11 @@ int FOptiMove::set_parm_up_cursor (char*& cap)
|
||||||
F_parm_up_cursor.length = capDurationToLength (F_parm_up_cursor.duration);
|
F_parm_up_cursor.length = capDurationToLength (F_parm_up_cursor.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_parm_up_cursor.duration = LONG_DURATION;
|
{
|
||||||
|
F_parm_up_cursor.cap = 0;
|
||||||
|
F_parm_up_cursor.duration = \
|
||||||
|
F_parm_up_cursor.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_parm_up_cursor.length;
|
return F_parm_up_cursor.length;
|
||||||
}
|
}
|
||||||
|
@ -285,7 +337,11 @@ int FOptiMove::set_parm_down_cursor (char*& cap)
|
||||||
F_parm_down_cursor.length = capDurationToLength (F_parm_down_cursor.duration);
|
F_parm_down_cursor.length = capDurationToLength (F_parm_down_cursor.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_parm_down_cursor.duration = LONG_DURATION;
|
{
|
||||||
|
F_parm_down_cursor.cap = 0;
|
||||||
|
F_parm_down_cursor.duration = \
|
||||||
|
F_parm_down_cursor.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_parm_down_cursor.length;
|
return F_parm_down_cursor.length;
|
||||||
}
|
}
|
||||||
|
@ -301,7 +357,11 @@ int FOptiMove::set_parm_left_cursor (char*& cap)
|
||||||
F_parm_left_cursor.length = capDurationToLength (F_parm_left_cursor.duration);
|
F_parm_left_cursor.length = capDurationToLength (F_parm_left_cursor.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_parm_left_cursor.duration = LONG_DURATION;
|
{
|
||||||
|
F_parm_left_cursor.cap = 0;
|
||||||
|
F_parm_left_cursor.duration = \
|
||||||
|
F_parm_left_cursor.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_parm_left_cursor.length;
|
return F_parm_left_cursor.length;
|
||||||
}
|
}
|
||||||
|
@ -317,7 +377,11 @@ int FOptiMove::set_parm_right_cursor (char*& cap)
|
||||||
F_parm_right_cursor.length = capDurationToLength (F_parm_right_cursor.duration);
|
F_parm_right_cursor.length = capDurationToLength (F_parm_right_cursor.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_parm_right_cursor.duration = LONG_DURATION;
|
{
|
||||||
|
F_parm_right_cursor.cap = 0;
|
||||||
|
F_parm_right_cursor.duration = \
|
||||||
|
F_parm_right_cursor.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_parm_right_cursor.length;
|
return F_parm_right_cursor.length;
|
||||||
}
|
}
|
||||||
|
@ -333,7 +397,11 @@ int FOptiMove::set_erase_chars (char*& cap)
|
||||||
F_erase_chars.length = capDurationToLength (F_erase_chars.duration);
|
F_erase_chars.length = capDurationToLength (F_erase_chars.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_erase_chars.duration = LONG_DURATION;
|
{
|
||||||
|
F_erase_chars.cap = 0;
|
||||||
|
F_erase_chars.duration = \
|
||||||
|
F_erase_chars.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_erase_chars.length;
|
return F_erase_chars.length;
|
||||||
}
|
}
|
||||||
|
@ -349,7 +417,11 @@ int FOptiMove::set_repeat_char (char*& cap)
|
||||||
F_repeat_char.length = capDurationToLength (F_repeat_char.duration);
|
F_repeat_char.length = capDurationToLength (F_repeat_char.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_repeat_char.duration = LONG_DURATION;
|
{
|
||||||
|
F_repeat_char.cap = 0;
|
||||||
|
F_repeat_char.duration = \
|
||||||
|
F_repeat_char.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_repeat_char.length;
|
return F_repeat_char.length;
|
||||||
}
|
}
|
||||||
|
@ -364,7 +436,11 @@ int FOptiMove::set_clr_bol (char*& cap)
|
||||||
F_clr_bol.length = capDurationToLength (F_clr_bol.duration);
|
F_clr_bol.length = capDurationToLength (F_clr_bol.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_clr_bol.duration = LONG_DURATION;
|
{
|
||||||
|
F_clr_bol.cap = 0;
|
||||||
|
F_clr_bol.duration = \
|
||||||
|
F_clr_bol.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_clr_bol.length;
|
return F_clr_bol.length;
|
||||||
}
|
}
|
||||||
|
@ -379,7 +455,11 @@ int FOptiMove::set_clr_eol (char*& cap)
|
||||||
F_clr_eol.length = capDurationToLength (F_clr_eol.duration);
|
F_clr_eol.length = capDurationToLength (F_clr_eol.duration);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
F_clr_eol.duration = LONG_DURATION;
|
{
|
||||||
|
F_clr_eol.cap = 0;
|
||||||
|
F_clr_eol.duration = \
|
||||||
|
F_clr_eol.length = LONG_DURATION;
|
||||||
|
}
|
||||||
|
|
||||||
return F_clr_eol.length;
|
return F_clr_eol.length;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1327,6 +1327,18 @@ void FTerm::setEncoding (std::string enc)
|
||||||
default:
|
default:
|
||||||
Fputchar = &FTerm::putchar_ASCII;
|
Fputchar = &FTerm::putchar_ASCII;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( linux_terminal )
|
||||||
|
{
|
||||||
|
if ( Encoding == fc::VT100 || Encoding == fc::PC )
|
||||||
|
{
|
||||||
|
char* empty = 0;
|
||||||
|
opti_move->set_tabular (empty);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
opti_move->set_tabular (tcap[fc::t_tab].string);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -3031,6 +3043,13 @@ void FTerm::init_encoding()
|
||||||
Encoding = fc::VT100;
|
Encoding = fc::VT100;
|
||||||
Fputchar = &FTerm::putchar_ASCII; // function pointer
|
Fputchar = &FTerm::putchar_ASCII; // function pointer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( linux_terminal
|
||||||
|
&& (Encoding == fc::VT100 || Encoding == fc::PC) )
|
||||||
|
{
|
||||||
|
char* empty = 0;
|
||||||
|
opti_move->set_tabular (empty);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -3278,7 +3297,7 @@ void FTerm::init()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// xterm mouse support
|
// xterm mouse support
|
||||||
if ( tcap[fc::t_key_mouse].string != 0 )
|
if ( tcap[fc::t_key_mouse].string != 0 && ! linux_terminal )
|
||||||
{
|
{
|
||||||
mouse_support = true;
|
mouse_support = true;
|
||||||
enableXTermMouse();
|
enableXTermMouse();
|
||||||
|
|
Loading…
Reference in New Issue