mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 11:38:31 +00:00
lint
This commit is contained in:
@@ -969,7 +969,8 @@ void set_init_2(bool headless)
|
||||
p_window = Rows - 1;
|
||||
}
|
||||
set_number_default("window", Rows - 1);
|
||||
#if 0 // This bodges around problems that should properly be fixed in the TUI layer.
|
||||
#if 0
|
||||
// This bodges around problems that should be fixed in the TUI layer.
|
||||
if (!headless && !os_term_is_nice()) {
|
||||
set_string_option_direct((char_u *)"guicursor", -1, (char_u *)"",
|
||||
OPT_GLOBAL, SID_NONE);
|
||||
|
@@ -5824,13 +5824,12 @@ static void screen_char(unsigned off, int row, int col)
|
||||
if (row >= screen_Rows || col >= screen_Columns)
|
||||
return;
|
||||
|
||||
/* Outputting the last character on the screen may scrollup the screen.
|
||||
* 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 */
|
||||
// Outputting the last character on the screen may scrollup the screen.
|
||||
// Don't to it! Mark the character invalid (update it when scrolled up)
|
||||
// FIXME: The premise here is not actually true (cf. deferred wrap).
|
||||
if (row == screen_Rows - 1 && col == screen_Columns - 1
|
||||
/* account for first command-line character in rightleft mode */
|
||||
&& !cmdmsg_rl
|
||||
) {
|
||||
// account for first command-line character in rightleft mode
|
||||
&& !cmdmsg_rl) {
|
||||
ScreenAttrs[off] = (sattr_T)-1;
|
||||
return;
|
||||
}
|
||||
|
@@ -115,6 +115,7 @@ unibi_term *load_builtin_terminfo(const char * term)
|
||||
return unibi_from_mem((const char *)vte_256colour_terminfo,
|
||||
sizeof vte_256colour_terminfo);
|
||||
} else {
|
||||
return unibi_from_mem((const char *)ansi_terminfo, sizeof ansi_terminfo);
|
||||
return unibi_from_mem((const char *)ansi_terminfo,
|
||||
sizeof ansi_terminfo);
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#ifndef NVIM_TUI_TERMINFO_H
|
||||
#define NVIM_TUI_TERMINFO_H
|
||||
|
||||
#include <unibilium.h>
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "tui/terminfo.h.generated.h"
|
||||
#endif
|
||||
|
@@ -1254,7 +1254,8 @@ static int unibi_find_ext_bool(unibi_term *ut, const char *name)
|
||||
/// external or a built-in database. In an ideal world, the real terminfo data
|
||||
/// would be correct and complete, and this function would be almost empty.
|
||||
static void patch_terminfo_bugs(TUIData *data, const char *term,
|
||||
const char *colorterm, long vte_version, bool konsole, bool iterm_env)
|
||||
const char *colorterm, long vte_version,
|
||||
bool konsole, bool iterm_env)
|
||||
{
|
||||
unibi_term *ut = data->ut;
|
||||
const char * xterm_version = os_getenv("XTERM_VERSION");
|
||||
@@ -1411,8 +1412,7 @@ static void patch_terminfo_bugs(TUIData *data, const char *term,
|
||||
unibi_set_num(ut, unibi_max_colors, 256);
|
||||
unibi_set_str(ut, unibi_set_a_foreground, XTERM_SETAF_256);
|
||||
unibi_set_str(ut, unibi_set_a_background, XTERM_SETAB_256);
|
||||
} else
|
||||
if (konsole || xterm || gnome || rxvt || st || putty
|
||||
} else if (konsole || xterm || gnome || rxvt || st || putty
|
||||
|| linuxvt // Linux 4.8+ supports 256-colour SGR.
|
||||
|| mate_pretending_xterm || gnome_pretending_xterm
|
||||
|| tmux || tmux_pretending_screen
|
||||
@@ -1455,23 +1455,23 @@ static void patch_terminfo_bugs(TUIData *data, const char *term,
|
||||
// console-terminal-emulator from the nosh toolset, which does indeed
|
||||
// implement the xterm extension:
|
||||
|| (linuxvt && (xterm_version || (vte_version > 0) || colorterm))) {
|
||||
data->unibi_ext.set_cursor_style = (int)unibi_add_ext_str(ut, "Ss",
|
||||
"\x1b[%p1%d q");
|
||||
data->unibi_ext.set_cursor_style =
|
||||
(int)unibi_add_ext_str(ut, "Ss", "\x1b[%p1%d q");
|
||||
if (-1 == data->unibi_ext.reset_cursor_style) {
|
||||
data->unibi_ext.reset_cursor_style = (int)unibi_add_ext_str(ut, "Se",
|
||||
"");
|
||||
}
|
||||
unibi_set_ext_str(ut, (size_t)data->unibi_ext.reset_cursor_style,
|
||||
"\x1b[ q");
|
||||
} else
|
||||
if (putty // per MinTTY 0.4.3-1 release notes from 2009
|
||||
} else if (
|
||||
// per MinTTY 0.4.3-1 release notes from 2009
|
||||
putty
|
||||
// per https://bugzilla.gnome.org/show_bug.cgi?id=720821
|
||||
|| (vte_version >= 3900)
|
||||
// per tmux manual page and per
|
||||
// https://lists.gnu.org/archive/html/screen-devel/2013-03/msg00000.html
|
||||
|| screen) {
|
||||
// Since we use the xterm extension, we have to map it to the unextended
|
||||
// form.
|
||||
// Since we use the xterm extension, we must map it to the unextended form
|
||||
data->unibi_ext.set_cursor_style = (int)unibi_add_ext_str(ut, "Ss",
|
||||
"\x1b[%?"
|
||||
"%p1%{4}%>" "%t%p1%{2}%-" // a bit of a bodge for extension values
|
||||
|
Reference in New Issue
Block a user