Add the possibility to switch off the cursor optimization
This commit is contained in:
parent
a1b7e34d7d
commit
7590d2101d
|
@ -114,6 +114,7 @@ void FApplication::cmd_options ()
|
|||
static struct option long_options[] =
|
||||
{
|
||||
{"encoding", required_argument, 0, 0 },
|
||||
{"no-optimized-cursor", no_argument, 0, 0 },
|
||||
{"vgafont", no_argument, 0, 0 },
|
||||
{"newfont", no_argument, 0, 0 },
|
||||
{0, 0, 0, 0 }
|
||||
|
@ -141,8 +142,13 @@ void FApplication::cmd_options ()
|
|||
setEncoding(encoding.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
if ( strcmp(long_options[idx].name, "no-optimize-cursor") == 0 )
|
||||
setCursorOptimisation (false);
|
||||
|
||||
if ( strcmp(long_options[idx].name, "vgafont") == 0 )
|
||||
setVGAFont();
|
||||
|
||||
if ( strcmp(long_options[idx].name, "newfont") == 0 )
|
||||
setNewFont();
|
||||
}
|
||||
|
@ -1264,6 +1270,7 @@ void FApplication::print_cmd_Options ()
|
|||
::printf("\nFinalCut Options:\n"
|
||||
" --encoding <name> Sets the character encoding mode\n"
|
||||
" {UTF8, VT100, PC, ASCII}\n"
|
||||
" --no-optimized-cursor No cursor optimisation\n"
|
||||
" --vgafont Set the standard vga 8x16 font\n"
|
||||
" --newfont Enables the graphical font\n");
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// ▕ FOptiMove ▏
|
||||
// ▕▁▁▁▁▁▁▁▁▁▁▁▏
|
||||
|
||||
// The cursor optimisation based on ncurses lib_mvcur.c
|
||||
// The cursor optimization based on ncurses lib_mvcur.c
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#ifndef _FOPTIMOVE_H
|
||||
|
|
|
@ -87,6 +87,7 @@ bool FTerm::vt100_console;
|
|||
bool FTerm::ascii_console;
|
||||
bool FTerm::NewFont;
|
||||
bool FTerm::VGAFont;
|
||||
bool FTerm::cursor_optimisation;
|
||||
uChar FTerm::x11_button_state;
|
||||
termios FTerm::term_init;
|
||||
char FTerm::termtype[30] = "";
|
||||
|
@ -591,6 +592,9 @@ int FTerm::parseKeyString ( char* buffer
|
|||
buffer[n] = '\0';
|
||||
input_data_pending = bool(buffer[0] != '\0');
|
||||
|
||||
if ( key == 0 ) // Ctrl+Space or Ctrl+@
|
||||
key = fc::Fckey_space;
|
||||
|
||||
return int(key == 127 ? fc::Fkey_backspace : key);
|
||||
}
|
||||
|
||||
|
@ -1328,6 +1332,9 @@ void FTerm::init()
|
|||
tmux_terminal = \
|
||||
background_color_erase = false;
|
||||
|
||||
// Preset to true
|
||||
cursor_optimisation = true;
|
||||
|
||||
// assertion: programm start in cooked mode
|
||||
raw_mode = \
|
||||
input_data_pending = \
|
||||
|
@ -3186,7 +3193,10 @@ void FTerm::setTermXY (register int x, register int y)
|
|||
if ( y >= term_height )
|
||||
y = term_height - 1;
|
||||
|
||||
if ( cursor_optimisation )
|
||||
move_str = opti->cursor_move (x_term_pos, y_term_pos, x, y);
|
||||
else
|
||||
move_str = tgoto(tcap[t_cursor_address].string, x, y);
|
||||
if ( move_str )
|
||||
appendOutputBuffer(move_str);
|
||||
flush_out();
|
||||
|
|
|
@ -186,6 +186,7 @@ class FTerm
|
|||
static bool underline;
|
||||
static bool NewFont;
|
||||
static bool VGAFont;
|
||||
static bool cursor_optimisation;
|
||||
static uInt tabstop;
|
||||
static fc::encoding Encoding;
|
||||
|
||||
|
@ -301,6 +302,7 @@ class FTerm
|
|||
static bool setNewFont();
|
||||
static bool isNewFont();
|
||||
static bool setOldFont();
|
||||
static bool setCursorOptimisation (bool);
|
||||
static void setConsoleCursor (fc::console_cursor_style);
|
||||
static void getTermSize();
|
||||
static void setTermSize (int, int);
|
||||
|
@ -529,6 +531,13 @@ inline bool FTerm::isTeraTerm()
|
|||
inline bool FTerm::isUrxvtTerminal()
|
||||
{ return urxvt_terminal; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline bool FTerm::setCursorOptimisation (bool on)
|
||||
{
|
||||
cursor_optimisation = on;
|
||||
return cursor_optimisation;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline bool FTerm::isRaw()
|
||||
{ return raw_mode; }
|
||||
|
|
Loading…
Reference in New Issue