mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 03:28:33 +00:00
tui: Remove the iTerm2 corner case.
This commit is contained in:
@@ -5825,7 +5825,8 @@ static void screen_char(unsigned off, int row, int col)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Outputting the last character on the screen may scrollup the screen.
|
/* Outputting the last character on the screen may scrollup the screen.
|
||||||
* Don't to it! Mark the character invalid (update it when scrolled up) */
|
* Don't to it! Mark the character invalid (update it when scrolled up)
|
||||||
|
* FIXME: The premise here is not actually true. c.f. deferred wrap */
|
||||||
if (row == screen_Rows - 1 && col == screen_Columns - 1
|
if (row == screen_Rows - 1 && col == screen_Columns - 1
|
||||||
/* account for first command-line character in rightleft mode */
|
/* account for first command-line character in rightleft mode */
|
||||||
&& !cmdmsg_rl
|
&& !cmdmsg_rl
|
||||||
|
@@ -91,7 +91,6 @@ typedef struct {
|
|||||||
bool can_set_lr_margin;
|
bool can_set_lr_margin;
|
||||||
bool can_set_left_right_margin;
|
bool can_set_left_right_margin;
|
||||||
bool immediate_wrap_after_last_column;
|
bool immediate_wrap_after_last_column;
|
||||||
bool no_bottom_right_corner;
|
|
||||||
bool mouse_enabled;
|
bool mouse_enabled;
|
||||||
bool busy;
|
bool busy;
|
||||||
cursorentry_T cursor_shapes[SHAPE_IDX_COUNT];
|
cursorentry_T cursor_shapes[SHAPE_IDX_COUNT];
|
||||||
@@ -202,9 +201,6 @@ static void terminfo_start(UI *ui)
|
|||||||
data->can_set_left_right_margin =
|
data->can_set_left_right_margin =
|
||||||
!!unibi_get_str(data->ut, unibi_set_left_margin_parm)
|
!!unibi_get_str(data->ut, unibi_set_left_margin_parm)
|
||||||
&& !!unibi_get_str(data->ut, unibi_set_right_margin_parm);
|
&& !!unibi_get_str(data->ut, unibi_set_right_margin_parm);
|
||||||
data->no_bottom_right_corner =
|
|
||||||
terminfo_is_term_family(term, "iterm")
|
|
||||||
|| (terminfo_is_term_family(term, "xterm") && iterm_env);
|
|
||||||
data->immediate_wrap_after_last_column =
|
data->immediate_wrap_after_last_column =
|
||||||
terminfo_is_term_family(term, "cygwin")
|
terminfo_is_term_family(term, "cygwin")
|
||||||
|| terminfo_is_term_family(term, "interix");
|
|| terminfo_is_term_family(term, "interix");
|
||||||
@@ -436,13 +432,6 @@ static void print_cell(UI *ui, UCell *ptr)
|
|||||||
{
|
{
|
||||||
TUIData *data = ui->data;
|
TUIData *data = ui->data;
|
||||||
UGrid *grid = &data->grid;
|
UGrid *grid = &data->grid;
|
||||||
if (data->no_bottom_right_corner
|
|
||||||
&& grid->row >= ui->height - 1
|
|
||||||
&& grid->col >= ui->width - 1) {
|
|
||||||
// This (rare) kind of terminal simply cannot print in this corner without
|
|
||||||
// scrolling the entire screen up a line, which we do not want to happen.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!data->immediate_wrap_after_last_column) {
|
if (!data->immediate_wrap_after_last_column) {
|
||||||
// Printing the next character finally advances the cursor.
|
// Printing the next character finally advances the cursor.
|
||||||
final_column_wrap(ui);
|
final_column_wrap(ui);
|
||||||
|
Reference in New Issue
Block a user