mirror of
https://github.com/neovim/neovim
synced 2025-07-22 14:21:58 +00:00
Compare commits
31 Commits
Author | SHA1 | Date | |
---|---|---|---|
b99dad7b4c | |||
1def94597b | |||
b678d33dd3 | |||
a012387074 | |||
599ad5d3b8 | |||
924fa143cc | |||
327e8ddb18 | |||
a1f557690f | |||
f2f37712a4 | |||
4f452a6744 | |||
9571a87d3d | |||
3817518ab4 | |||
56d9412999 | |||
ddd3363a42 | |||
d453d2c484 | |||
c5d1b0f3da | |||
e0622b4c65 | |||
b781f2b072 | |||
e63fdf63ba | |||
eef3809067 | |||
43f4955f70 | |||
6f693be1ee | |||
36e2846b49 | |||
60b56ed458 | |||
8250d6795b | |||
38d02d58b2 | |||
7d6aa82b69 | |||
6c65f8f182 | |||
6cb5ffc075 | |||
baa5263b56 | |||
2abdb89522 |
@ -114,7 +114,7 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
|
||||
# version string, else they are combined with the result of `git describe`.
|
||||
set(NVIM_VERSION_MAJOR 0)
|
||||
set(NVIM_VERSION_MINOR 4)
|
||||
set(NVIM_VERSION_PATCH 0)
|
||||
set(NVIM_VERSION_PATCH 3)
|
||||
set(NVIM_VERSION_PRERELEASE "") # for package maintainers
|
||||
|
||||
# API level
|
||||
|
@ -40,6 +40,3 @@ cache:
|
||||
artifacts:
|
||||
- path: build/Neovim.zip
|
||||
- path: build/bin/nvim.exe
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
@ -4583,6 +4583,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
RedrawDebugRecompose guibg=Red redraw generated by the
|
||||
compositor itself, due to a
|
||||
grid being moved or deleted.
|
||||
nothrottle Turn off throttling of the message grid. This is an
|
||||
optimization that joins many small scrolls to one
|
||||
larger scroll when drawing the message area (with
|
||||
'display' msgsep flag active).
|
||||
invalid Enable stricter checking (abort) of inconsistencies
|
||||
of the internal screen state. This is mostly
|
||||
useful when running nvim inside a debugger (and
|
||||
the test suite).
|
||||
nodelta Send all internally redrawn cells to the UI, even if
|
||||
they are unchanged from the already displayed state.
|
||||
|
||||
*'redrawtime'* *'rdt'*
|
||||
'redrawtime' 'rdt' number (default 2000)
|
||||
@ -6908,7 +6918,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
The number of milliseconds to wait for each character sent to the
|
||||
screen. When positive, characters are sent to the UI one by one.
|
||||
When negative, all redrawn characters cause a delay, even if the
|
||||
character already was displayed by the UI. For debugging purposes.
|
||||
See 'redrawdebug' for more options. For debugging purposes.
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
@ -26,6 +26,9 @@
|
||||
</screenshots>
|
||||
|
||||
<releases>
|
||||
<release date="2019-09-15" version="0.4.2"/>
|
||||
<release date="2019-09-15" version="0.4.1"/>
|
||||
<release date="2019-09-15" version="0.4.0"/>
|
||||
<release date="2019-07-03" version="0.3.8"/>
|
||||
<release date="2019-04-29" version="0.3.5"/>
|
||||
<release date="2019-01-13" version="0.3.4"/>
|
||||
|
@ -21,9 +21,9 @@ return {
|
||||
'BufWritePre', -- before writing a buffer
|
||||
'ChanInfo', -- info was received about channel
|
||||
'ChanOpen', -- channel was opened
|
||||
'CmdLineChanged', -- command line was modified
|
||||
'CmdLineEnter', -- after entering cmdline mode
|
||||
'CmdLineLeave', -- before leaving cmdline mode
|
||||
'CmdlineChanged', -- command line was modified
|
||||
'CmdlineEnter', -- after entering cmdline mode
|
||||
'CmdlineLeave', -- before leaving cmdline mode
|
||||
'CmdUndefined', -- command undefined
|
||||
'CmdWinEnter', -- after entering the cmdline window
|
||||
'CmdWinLeave', -- before leaving the cmdline window
|
||||
|
@ -18747,8 +18747,9 @@ static void f_visualmode(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
*/
|
||||
static void f_wildmenumode(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
{
|
||||
if (wild_menu_showing)
|
||||
if (wild_menu_showing || ((State & CMDLINE) && pum_visible())) {
|
||||
rettv->vval.v_number = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/// "win_findbuf()" function
|
||||
|
@ -189,7 +189,7 @@ paste = (function()
|
||||
if mode == 'c' and not got_line1 then -- cmdline-mode: paste only 1 line.
|
||||
got_line1 = (#lines > 1)
|
||||
vim.api.nvim_set_option('paste', true) -- For nvim_input().
|
||||
local line1, _ = string.gsub(lines[1], '[\r\n\012\027]', ' ') -- Scrub.
|
||||
local line1 = lines[1]:gsub('<', '<lt>'):gsub('[\r\n\012\027]', ' ') -- Scrub.
|
||||
vim.api.nvim_input(line1)
|
||||
vim.api.nvim_set_option('paste', false)
|
||||
elseif mode ~= 'c' then -- Else: discard remaining cmdline-mode chunks.
|
||||
|
@ -957,6 +957,7 @@ static void command_line_scan(mparm_T *parmp)
|
||||
case 'r': // "-r" recovery mode
|
||||
case 'L': { // "-L" recovery mode
|
||||
recoverymode = 1;
|
||||
headless_mode = true;
|
||||
break;
|
||||
}
|
||||
case 's': {
|
||||
|
@ -233,7 +233,10 @@ void msg_multiline_attr(const char *s, int attr, bool check_int)
|
||||
{
|
||||
const char *next_spec = s;
|
||||
|
||||
while (next_spec != NULL && (!check_int || !got_int)) {
|
||||
while (next_spec != NULL) {
|
||||
if (check_int && got_int) {
|
||||
return;
|
||||
}
|
||||
next_spec = strpbrk(s, "\t\n\r");
|
||||
|
||||
if (next_spec != NULL) {
|
||||
|
@ -4306,6 +4306,10 @@ static char *set_num_option(int opt_idx, char_u *varp, long value,
|
||||
if (value < 0) {
|
||||
errmsg = e_positive;
|
||||
}
|
||||
} else if (pp == &p_wd) {
|
||||
if (value < 0) {
|
||||
errmsg = e_positive;
|
||||
}
|
||||
}
|
||||
|
||||
// Don't change the value and return early if validation failed.
|
||||
|
@ -518,10 +518,18 @@ EXTERN long p_pyx; // 'pyxversion'
|
||||
EXTERN char_u *p_rdb; // 'redrawdebug'
|
||||
EXTERN unsigned rdb_flags;
|
||||
# ifdef IN_OPTION_C
|
||||
static char *(p_rdb_values[]) = { "compositor", "nothrottle", NULL };
|
||||
static char *(p_rdb_values[]) = {
|
||||
"compositor",
|
||||
"nothrottle",
|
||||
"invalid",
|
||||
"nodelta",
|
||||
NULL
|
||||
};
|
||||
# endif
|
||||
# define RDB_COMPOSITOR 0x001
|
||||
# define RDB_NOTHROTTLE 0x002
|
||||
# define RDB_INVALID 0x004
|
||||
# define RDB_NODELTA 0x008
|
||||
|
||||
EXTERN long p_rdt; // 'redrawtime'
|
||||
EXTERN int p_remap; // 'remap'
|
||||
|
@ -135,7 +135,16 @@ int os_setenv(const char *name, const char *value, int overwrite)
|
||||
}
|
||||
#endif
|
||||
uv_mutex_lock(&mutex);
|
||||
int r = uv_os_setenv(name, value);
|
||||
int r;
|
||||
#ifdef WIN32
|
||||
// libintl uses getenv() for LC_ALL/LANG/etc., so we must use _putenv_s().
|
||||
if (striequal(name, "LC_ALL") || striequal(name, "LANGUAGE")
|
||||
|| striequal(name, "LANG") || striequal(name, "LC_MESSAGES")) {
|
||||
r = _putenv_s(name, value); // NOLINT
|
||||
assert(r == 0);
|
||||
}
|
||||
#endif
|
||||
r = uv_os_setenv(name, value);
|
||||
assert(r != UV_EINVAL);
|
||||
// Destroy the old map item. Do this AFTER uv_os_setenv(), because `value`
|
||||
// could be a previous os_getenv() result.
|
||||
|
@ -577,11 +577,14 @@ void conceal_check_cursor_line(void)
|
||||
/// Whether cursorline is drawn in a special way
|
||||
///
|
||||
/// If true, both old and new cursorline will need
|
||||
/// need to be redrawn when moving cursor within windows.
|
||||
/// to be redrawn when moving cursor within windows.
|
||||
/// TODO(bfredl): VIsual_active shouldn't be needed, but is used to fix a glitch
|
||||
/// caused by scrolling.
|
||||
bool win_cursorline_standout(const win_T *wp)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
return wp->w_p_cul || (wp->w_p_cole > 0 && !conceal_cursor_line(wp));
|
||||
return wp->w_p_cul
|
||||
|| (wp->w_p_cole > 0 && (VIsual_active || !conceal_cursor_line(wp)));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -871,7 +874,7 @@ static void win_update(win_T *wp)
|
||||
if (wp->w_lines[0].wl_lnum != wp->w_topline)
|
||||
i += diff_check_fill(wp, wp->w_lines[0].wl_lnum)
|
||||
- wp->w_old_topfill;
|
||||
if (i < wp->w_grid.Rows - 2) { // less than a screen off
|
||||
if (i != 0 && i < wp->w_grid.Rows - 2) { // less than a screen off
|
||||
// Try to insert the correct number of lines.
|
||||
// If not the last window, delete the lines at the bottom.
|
||||
// win_ins_lines may fail when the terminal can't do it.
|
||||
@ -2403,10 +2406,10 @@ win_line (
|
||||
filler_todo = filler_lines;
|
||||
|
||||
// Cursor line highlighting for 'cursorline' in the current window.
|
||||
if (wp->w_p_cul && lnum == wp->w_cursor.lnum) {
|
||||
if (lnum == wp->w_cursor.lnum) {
|
||||
// Do not show the cursor line when Visual mode is active, because it's
|
||||
// not clear what is selected then.
|
||||
if (!(wp == curwin && VIsual_active)) {
|
||||
if (wp->w_p_cul && !(wp == curwin && VIsual_active)) {
|
||||
int cul_attr = win_hl_attr(wp, HLF_CUL);
|
||||
HlAttrs ae = syn_attr2entry(cul_attr);
|
||||
|
||||
@ -4007,7 +4010,7 @@ win_line (
|
||||
break;
|
||||
}
|
||||
|
||||
++vcol;
|
||||
vcol += cells;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4353,7 +4356,7 @@ static int grid_char_needs_redraw(ScreenGrid *grid, int off_from, int off_to,
|
||||
|| (line_off2cells(linebuf_char, off_from, off_from + cols) > 1
|
||||
&& schar_cmp(linebuf_char[off_from + 1],
|
||||
grid->chars[off_to + 1])))
|
||||
|| p_wd < 0));
|
||||
|| rdb_flags & RDB_NODELTA));
|
||||
}
|
||||
|
||||
/// Move one buffered line to the window grid, but only the characters that
|
||||
@ -5103,6 +5106,8 @@ win_redr_custom (
|
||||
win_T *ewp;
|
||||
int p_crb_save;
|
||||
|
||||
ScreenGrid *grid = &default_grid;
|
||||
|
||||
/* There is a tiny chance that this gets called recursively: When
|
||||
* redrawing a status line triggers redrawing the ruler or tabline.
|
||||
* Avoid trouble by not allowing recursion. */
|
||||
@ -5142,10 +5147,11 @@ win_redr_custom (
|
||||
}
|
||||
maxwidth = wp->w_width - col;
|
||||
if (!wp->w_status_height) {
|
||||
grid = &msg_grid_adj;
|
||||
row = Rows - 1;
|
||||
maxwidth--; // writing in last column may cause scrolling
|
||||
fillchar = ' ';
|
||||
attr = 0;
|
||||
attr = HL_ATTR(HLF_MSG);
|
||||
}
|
||||
|
||||
use_sandbox = was_set_insecurely((char_u *)"rulerformat", 0);
|
||||
@ -5195,13 +5201,13 @@ win_redr_custom (
|
||||
/*
|
||||
* Draw each snippet with the specified highlighting.
|
||||
*/
|
||||
grid_puts_line_start(&default_grid, row);
|
||||
grid_puts_line_start(grid, row);
|
||||
|
||||
curattr = attr;
|
||||
p = buf;
|
||||
for (n = 0; hltab[n].start != NULL; n++) {
|
||||
int textlen = (int)(hltab[n].start - p);
|
||||
grid_puts_len(&default_grid, p, textlen, row, col, curattr);
|
||||
grid_puts_len(grid, p, textlen, row, col, curattr);
|
||||
col += vim_strnsize(p, textlen);
|
||||
p = hltab[n].start;
|
||||
|
||||
@ -5215,7 +5221,7 @@ win_redr_custom (
|
||||
curattr = highlight_user[hltab[n].userhl - 1];
|
||||
}
|
||||
// Make sure to use an empty string instead of p, if p is beyond buf + len.
|
||||
grid_puts(&default_grid, p >= buf + len ? (char_u *)"" : p, row, col,
|
||||
grid_puts(grid, p >= buf + len ? (char_u *)"" : p, row, col,
|
||||
curattr);
|
||||
|
||||
grid_puts_line_flush(false);
|
||||
@ -7060,7 +7066,7 @@ static void win_redr_ruler(win_T *wp, int always)
|
||||
} else {
|
||||
row = Rows - 1;
|
||||
fillchar = ' ';
|
||||
attr = 0;
|
||||
attr = HL_ATTR(HLF_MSG);
|
||||
width = Columns;
|
||||
off = 0;
|
||||
}
|
||||
|
@ -1508,11 +1508,11 @@ line_read_in:
|
||||
* compute the first offset.
|
||||
*/
|
||||
if (state == TS_BINARY) {
|
||||
// Get the tag file size.
|
||||
if ((filesize = vim_lseek(fileno(fp), (off_T)0L, SEEK_END)) <= 0) {
|
||||
if (vim_fseek(fp, 0, SEEK_END) != 0) {
|
||||
state = TS_LINEAR;
|
||||
} else {
|
||||
vim_lseek(fileno(fp), (off_T)0L, SEEK_SET);
|
||||
filesize = vim_ftell(fp);
|
||||
vim_fseek(fp, 0, SEEK_SET);
|
||||
|
||||
/* Calculate the first read offset in the file. Start
|
||||
* the search in the middle of the file. */
|
||||
|
@ -220,8 +220,6 @@ Terminal *terminal_open(TerminalOptions opts)
|
||||
rv->sb_size = (size_t)curbuf->b_p_scbk;
|
||||
rv->sb_buffer = xmalloc(sizeof(ScrollbackLine *) * rv->sb_size);
|
||||
|
||||
vterm_state_set_bold_highbright(state, true);
|
||||
|
||||
// Configure the color palette. Try to get the color from:
|
||||
//
|
||||
// - b:terminal_color_{NUM}
|
||||
|
@ -93,7 +93,7 @@ typedef struct {
|
||||
int out_fd;
|
||||
bool scroll_region_is_full_screen;
|
||||
bool can_change_scroll_region;
|
||||
bool can_set_lr_margin;
|
||||
bool can_set_lr_margin; // smglr
|
||||
bool can_set_left_right_margin;
|
||||
bool can_scroll;
|
||||
bool can_erase_chars;
|
||||
@ -312,6 +312,7 @@ static void terminfo_start(UI *ui)
|
||||
uv_pipe_init(&data->write_loop, &data->output_handle.pipe, 0);
|
||||
uv_pipe_open(&data->output_handle.pipe, data->out_fd);
|
||||
}
|
||||
flush_buf(ui);
|
||||
}
|
||||
|
||||
static void terminfo_stop(UI *ui)
|
||||
@ -1598,6 +1599,12 @@ static void patch_terminfo_bugs(TUIData *data, const char *term,
|
||||
unibi_set_if_empty(ut, unibi_set_lr_margin, "\x1b[%i%p1%d;%p2%ds");
|
||||
unibi_set_if_empty(ut, unibi_set_left_margin_parm, "\x1b[%i%p1%ds");
|
||||
unibi_set_if_empty(ut, unibi_set_right_margin_parm, "\x1b[%i;%p2%ds");
|
||||
} else {
|
||||
// Fix things advertised via TERM=xterm, for non-xterm.
|
||||
if (unibi_get_str(ut, unibi_set_lr_margin)) {
|
||||
ILOG("Disabling smglr with TERM=xterm for non-xterm.");
|
||||
unibi_set_str(ut, unibi_set_lr_margin, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
|
@ -425,6 +425,15 @@ static void compose_line(Integer row, Integer startcol, Integer endcol,
|
||||
flags = flags & ~kLineFlagWrap;
|
||||
}
|
||||
|
||||
for (int i = skipstart; i < (endcol-skipend)-startcol; i++) {
|
||||
if (attrbuf[i] < 0) {
|
||||
if (rdb_flags & RDB_INVALID) {
|
||||
abort();
|
||||
} else {
|
||||
attrbuf[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
ui_composed_call_raw_line(1, row, startcol+skipstart,
|
||||
endcol-skipend, endcol-skipend, 0, flags,
|
||||
(const schar_T *)linebuf+skipstart,
|
||||
@ -535,6 +544,11 @@ static void ui_comp_raw_line(UI *ui, Integer grid, Integer row,
|
||||
} else {
|
||||
compose_debug(row, row+1, startcol, endcol, dbghl_normal, false);
|
||||
compose_debug(row, row+1, endcol, clearcol, dbghl_clear, true);
|
||||
#ifndef NDEBUG
|
||||
for (int i = 0; i < endcol-startcol; i++) {
|
||||
assert(attrs[i] >= 0);
|
||||
}
|
||||
#endif
|
||||
ui_composed_call_raw_line(1, row, startcol, endcol, clearcol, clearattr,
|
||||
flags, chunk, attrs);
|
||||
}
|
||||
|
Binary file not shown.
@ -38,7 +38,7 @@ module.nvim_prog = (
|
||||
module.nvim_set = (
|
||||
'set shortmess+=IS background=light noswapfile noautoindent'
|
||||
..' laststatus=1 undodir=. directory=. viewdir=. backupdir=.'
|
||||
..' belloff= wildoptions-=pum noshowcmd noruler nomore')
|
||||
..' belloff= wildoptions-=pum noshowcmd noruler nomore redrawdebug=invalid')
|
||||
module.nvim_argv = {
|
||||
module.nvim_prog, '-u', 'NONE', '-i', 'NONE',
|
||||
'--cmd', module.nvim_set, '--embed'}
|
||||
|
@ -52,7 +52,7 @@ local function screen_setup(extra_rows, command, cols, opts)
|
||||
[3] = {bold = true},
|
||||
[4] = {foreground = 12},
|
||||
[5] = {bold = true, reverse = true},
|
||||
[6] = {background = 11},
|
||||
-- 6 was a duplicate item
|
||||
[7] = {foreground = 130},
|
||||
[8] = {foreground = 15, background = 1}, -- error message
|
||||
[9] = {foreground = 4},
|
||||
|
@ -578,6 +578,23 @@ describe('TUI', function()
|
||||
]])
|
||||
end)
|
||||
|
||||
it('paste: less-than sign in cmdline #11088', function()
|
||||
local expected = '<'
|
||||
feed_data(':')
|
||||
wait_for_mode('c')
|
||||
-- "bracketed paste"
|
||||
feed_data('\027[200~'..expected..'\027[201~')
|
||||
screen:expect{grid=[[
|
||||
|
|
||||
{4:~ }|
|
||||
{4:~ }|
|
||||
{4:~ }|
|
||||
{5:[No Name] }|
|
||||
:<{1: } |
|
||||
{3:-- TERMINAL --} |
|
||||
]]}
|
||||
end)
|
||||
|
||||
it('paste: big burst of input', function()
|
||||
feed_data(':set ruler\n')
|
||||
local t = {}
|
||||
|
@ -31,6 +31,9 @@ describe('Buffer highlighting', function()
|
||||
[14] = {background = Screen.colors.Gray90},
|
||||
[15] = {background = Screen.colors.Gray90, bold = true, foreground = Screen.colors.Brown},
|
||||
[16] = {foreground = Screen.colors.Magenta, background = Screen.colors.Gray90},
|
||||
[17] = {foreground = Screen.colors.Magenta, background = Screen.colors.LightRed},
|
||||
[18] = {background = Screen.colors.LightRed},
|
||||
[19] = {foreground = Screen.colors.Blue1, background = Screen.colors.LightRed},
|
||||
})
|
||||
end)
|
||||
|
||||
@ -516,6 +519,32 @@ describe('Buffer highlighting', function()
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
it('works with color column', function()
|
||||
eq(-1, set_virtual_text(-1, 3, {{"暗x事", "Comment"}}, {}))
|
||||
screen:expect{grid=[[
|
||||
^1 + 2 {3:=}{2: 3} |
|
||||
3 + {11:ERROR:} invalid syntax |
|
||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
|
||||
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
|
||||
x = 4 {12:暗x事} |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]]}
|
||||
|
||||
command("set colorcolumn=9")
|
||||
screen:expect{grid=[[
|
||||
^1 + 2 {3:=}{2: }{17:3} |
|
||||
3 + {11:ERROR:} invalid syntax |
|
||||
5, 5, 5,{18: }5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5|
|
||||
, 5, 5, 5, 5, 5, 5, Lorem ipsum dolor s|
|
||||
x = 4 {12:暗}{19:x}{12:事} |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
|
|
||||
]]}
|
||||
end)
|
||||
end)
|
||||
|
||||
it('and virtual text use the same namespace counter', function()
|
||||
|
@ -3,6 +3,8 @@ local Screen = require('test.functional.ui.screen')
|
||||
|
||||
local feed = helpers.feed
|
||||
local clear = helpers.clear
|
||||
local command = helpers.command
|
||||
local insert = helpers.insert
|
||||
local write_file = helpers.write_file
|
||||
|
||||
describe('Diff mode screen', function()
|
||||
@ -957,3 +959,75 @@ int main(int argc, char **argv)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
it('win_update redraws lines properly', function()
|
||||
local screen
|
||||
clear()
|
||||
screen = Screen.new(30, 10)
|
||||
screen:attach()
|
||||
screen:set_default_attr_ids({
|
||||
[1] = {bold = true, foreground = Screen.colors.Blue1},
|
||||
[2] = {foreground = Screen.colors.Grey100, background = Screen.colors.Red},
|
||||
[3] = {background = Screen.colors.Red, foreground = Screen.colors.Grey100, special = Screen.colors.Yellow},
|
||||
[4] = {bold = true, foreground = Screen.colors.SeaGreen4},
|
||||
[5] = {special = Screen.colors.Yellow},
|
||||
[6] = {special = Screen.colors.Yellow, bold = true, foreground = Screen.colors.SeaGreen4},
|
||||
[7] = {foreground = Screen.colors.Grey0, background = Screen.colors.Grey100},
|
||||
[8] = {foreground = Screen.colors.Gray90, background = Screen.colors.Grey100},
|
||||
[9] = {foreground = tonumber('0x00000c'), background = Screen.colors.Grey100},
|
||||
[10] = {background = Screen.colors.Grey100, bold = true, foreground = tonumber('0xe5e5ff')},
|
||||
[11] = {background = Screen.colors.Grey100, bold = true, foreground = tonumber('0x2b8452')},
|
||||
[12] = {bold = true, reverse = true},
|
||||
[13] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.WebGray},
|
||||
[14] = {reverse = true},
|
||||
[15] = {background = Screen.colors.LightBlue},
|
||||
[16] = {background = Screen.colors.LightCyan1, bold = true, foreground = Screen.colors.Blue1},
|
||||
[17] = {bold = true, background = Screen.colors.Red},
|
||||
[18] = {background = Screen.colors.LightMagenta},
|
||||
})
|
||||
|
||||
insert([[
|
||||
1
|
||||
|
||||
|
||||
2
|
||||
1a
|
||||
]])
|
||||
command("vnew")
|
||||
insert([[
|
||||
2
|
||||
2a
|
||||
2b
|
||||
]])
|
||||
command("windo diffthis")
|
||||
command("windo 1")
|
||||
screen:expect{grid=[[
|
||||
{13: }{16:-------}{14:│}{13: }{15:^1 }|
|
||||
{13: }{16:-------}{14:│}{13: }{15: }|
|
||||
{13: }{16:-------}{14:│}{13: }{15: }|
|
||||
{13: }2 {14:│}{13: }2 |
|
||||
{13: }{17:2}{18:a }{14:│}{13: }{17:1}{18:a }|
|
||||
{13: }{15:2b }{14:│}{13: }{16:------------------}|
|
||||
{13: } {14:│}{13: } |
|
||||
{1:~ }{14:│}{1:~ }|
|
||||
{14:<me] [+] }{12:[No Name] [+] }|
|
||||
|
|
||||
]]}
|
||||
feed('<C-e>')
|
||||
feed('<C-e>')
|
||||
feed('<C-y>')
|
||||
feed('<C-y>')
|
||||
feed('<C-y>')
|
||||
screen:expect{grid=[[
|
||||
{13: }{16:-------}{14:│}{13: }{15:1 }|
|
||||
{13: }{16:-------}{14:│}{13: }{15: }|
|
||||
{13: }{16:-------}{14:│}{13: }{15:^ }|
|
||||
{13: }2 {14:│}{13: }2 |
|
||||
{13: }{17:2}{18:a }{14:│}{13: }{17:1}{18:a }|
|
||||
{13: }{15:2b }{14:│}{13: }{16:------------------}|
|
||||
{13: } {14:│}{13: } |
|
||||
{1:~ }{14:│}{1:~ }|
|
||||
{14:<me] [+] }{12:[No Name] [+] }|
|
||||
|
|
||||
]]}
|
||||
end)
|
||||
|
@ -810,6 +810,7 @@ describe('ui/builtin messages', function()
|
||||
[4] = {bold = true, foreground = Screen.colors.SeaGreen4},
|
||||
[5] = {foreground = Screen.colors.Blue1},
|
||||
[6] = {bold = true, foreground = Screen.colors.Magenta},
|
||||
[7] = {background = Screen.colors.Grey20},
|
||||
})
|
||||
end)
|
||||
|
||||
@ -902,6 +903,41 @@ vimComment xxx match /\s"[^\-:.%#=*].*$/ms=s+1,lc=1 excludenl contains=@vim
|
||||
meths.command_output('syntax list vimComment'))
|
||||
-- luacheck: pop
|
||||
end)
|
||||
|
||||
it('supports ruler with laststatus=0', function()
|
||||
command("set ruler laststatus=0")
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
0,0-1 All |
|
||||
]]}
|
||||
|
||||
command("hi MsgArea guibg=#333333")
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{7: 0,0-1 All }|
|
||||
]]}
|
||||
|
||||
command("set rulerformat=%15(%c%V\\ %p%%%)")
|
||||
screen:expect{grid=[[
|
||||
^ |
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{1:~ }|
|
||||
{7: 0,0-1 100% }|
|
||||
]]}
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('ui/ext_messages', function()
|
||||
@ -1089,7 +1125,7 @@ aliquip ex ea commodo consequat.]])
|
||||
|
||||
it('can be quit', function()
|
||||
screen:try_resize(25,5)
|
||||
feed(':echon join(map(range(0, &lines*2), "v:val"), "\\n")<cr>')
|
||||
feed(':echon join(map(range(0, &lines*10), "v:val"), "\\n")<cr>')
|
||||
screen:expect{grid=[[
|
||||
0 |
|
||||
1 |
|
||||
|
@ -516,6 +516,7 @@ describe('ui/ext_popupmenu', function()
|
||||
{1:~ }|
|
||||
:sign ^ |
|
||||
]])
|
||||
eq(0, funcs.wildmenumode())
|
||||
|
||||
feed('<tab>')
|
||||
screen:expect{grid=[[
|
||||
@ -530,6 +531,7 @@ describe('ui/ext_popupmenu', function()
|
||||
{1:~ }|
|
||||
:sign define^ |
|
||||
]], popupmenu={items=wild_expected, pos=0, anchor={1, 9, 6}}}
|
||||
eq(1, funcs.wildmenumode())
|
||||
|
||||
feed('<left>')
|
||||
screen:expect{grid=[[
|
||||
@ -589,6 +591,7 @@ describe('ui/ext_popupmenu', function()
|
||||
:sign unplace^ |
|
||||
]], popupmenu={items=wild_expected, pos=5, anchor={1, 9, 6}}}
|
||||
feed('<esc>')
|
||||
eq(0, funcs.wildmenumode())
|
||||
|
||||
-- check positioning with multibyte char in pattern
|
||||
command("e långfile1")
|
||||
|
@ -1,6 +1,7 @@
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
local Screen = require('test.functional.ui.screen')
|
||||
local clear, feed, command = helpers.clear, helpers.feed, helpers.command
|
||||
local eq = helpers.eq
|
||||
local insert = helpers.insert
|
||||
|
||||
describe('Screen', function()
|
||||
@ -17,6 +18,7 @@ describe('Screen', function()
|
||||
[3] = {reverse = true},
|
||||
[4] = {bold = true},
|
||||
[5] = {background = Screen.colors.Yellow},
|
||||
[6] = {background = Screen.colors.LightGrey},
|
||||
} )
|
||||
end)
|
||||
|
||||
@ -823,5 +825,96 @@ describe('Screen', function()
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
it('redraws properly with concealcursor in visual mode', function()
|
||||
command('set concealcursor=v conceallevel=2')
|
||||
|
||||
feed('10Ofoo barf bar barf eggs<esc>')
|
||||
feed(':3<cr>o a<Esc>ggV')
|
||||
screen:expect{grid=[[
|
||||
^f{6:oo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
a |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
{4:-- VISUAL LINE --} |
|
||||
]]}
|
||||
feed(string.rep('j', 15))
|
||||
screen:expect{grid=[[
|
||||
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||
{6:foo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||
^f{6:oo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||
{4:-- VISUAL LINE --} |
|
||||
]]}
|
||||
feed(string.rep('k', 15))
|
||||
screen:expect{grid=[[
|
||||
^f{6:oo }{1:b}{6: bar }{1:b}{6: eggs} |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
a |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
foo {1:b} bar {1:b} eggs |
|
||||
{4:-- VISUAL LINE --} |
|
||||
]]}
|
||||
end)
|
||||
end)
|
||||
|
||||
it('redraws not too much with conceallevel=1', function()
|
||||
command('set conceallevel=1')
|
||||
command('set redrawdebug+=nodelta')
|
||||
|
||||
insert([[
|
||||
aaa
|
||||
bbb
|
||||
ccc
|
||||
]])
|
||||
screen:expect{grid=[[
|
||||
aaa |
|
||||
bbb |
|
||||
ccc |
|
||||
^ |
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
|
|
||||
]]}
|
||||
|
||||
-- XXX: hack to get notifications, and check only a single line is
|
||||
-- updated. Could use next_msg() also.
|
||||
local orig_handle_grid_line = screen._handle_grid_line
|
||||
local grid_lines = {}
|
||||
function screen._handle_grid_line(self, grid, row, col, items)
|
||||
table.insert(grid_lines, {row, col, items})
|
||||
orig_handle_grid_line(self, grid, row, col, items)
|
||||
end
|
||||
feed('k')
|
||||
screen:expect{grid=[[
|
||||
aaa |
|
||||
bbb |
|
||||
^ccc |
|
||||
|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
|
|
||||
]]}
|
||||
eq(grid_lines, {{2, 0, {{'c', 0, 3}}}})
|
||||
end)
|
||||
end)
|
||||
|
8
third-party/CMakeLists.txt
vendored
8
third-party/CMakeLists.txt
vendored
@ -160,8 +160,8 @@ set(UNIBILIUM_SHA256 29815283c654277ef77a3adcc8840db79ddbb20a0f0b0c8f648bd8cd49a
|
||||
set(LIBTERMKEY_URL http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.21.1.tar.gz)
|
||||
set(LIBTERMKEY_SHA256 cecbf737f35d18f433c8d7864f63c0f878af41f8bd0255a3ebb16010dc044d5f)
|
||||
|
||||
set(LIBVTERM_URL https://github.com/neovim/libvterm/archive/4a5fa43e0dbc0db4fe67d40d788d60852864df9e.tar.gz)
|
||||
set(LIBVTERM_SHA256 49b3cf2dcb988b887671b1011cfeac98ff81bb5c23fb4ac34b91a59524992935)
|
||||
set(LIBVTERM_URL https://github.com/neovim/libvterm/archive/7c72294d84ce20da4c27362dbd7fa4b08cfc91da.tar.gz)
|
||||
set(LIBVTERM_SHA256 f30c4d43e0c6db3e0912daf7188d98fbf6ee88f97589d72f6f304e5db48826a8)
|
||||
|
||||
set(LUV_VERSION 1.30.0-0)
|
||||
set(LUV_URL https://github.com/luvit/luv/archive/${LUV_VERSION}.tar.gz)
|
||||
@ -177,8 +177,8 @@ set(GPERF_SHA256 588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae
|
||||
set(WINTOOLS_URL https://github.com/neovim/deps/raw/2f9acbecf06365c10baa3c0087f34a54c9c6f949/opt/win32tools.zip)
|
||||
set(WINTOOLS_SHA256 8bfce7e3a365721a027ce842f2ec1cf878f1726233c215c05964aac07300798c)
|
||||
|
||||
set(WINGUI_URL https://github.com/equalsraf/neovim-qt/releases/download/v0.2.14/neovim-qt.zip)
|
||||
set(WINGUI_SHA256 dfcb1f7d25d4907dc1d4f20edd71ff9eb4762196225106bec01274dd668fb04c)
|
||||
set(WINGUI_URL https://github.com/equalsraf/neovim-qt/releases/download/v0.2.15/neovim-qt.zip)
|
||||
set(WINGUI_SHA256 b519ecb80b60522d25043f2d076a55656f5fbe5adf7f7e2943e5d8b161043987)
|
||||
|
||||
set(WIN32YANK_X86_URL https://github.com/equalsraf/win32yank/releases/download/v0.0.4/win32yank-x86.zip)
|
||||
set(WIN32YANK_X86_SHA256 62f34e5a46c5d4a7b3f3b512e1ff7b77fedd432f42581cbe825233a996eed62c)
|
||||
|
1
third-party/cmake/BuildLibtermkey.cmake
vendored
1
third-party/cmake/BuildLibtermkey.cmake
vendored
@ -48,6 +48,7 @@ ExternalProject_Add(libtermkey
|
||||
PREFIX=${DEPS_INSTALL_DIR}
|
||||
PKG_CONFIG_PATH=${DEPS_LIB_DIR}/pkgconfig
|
||||
CFLAGS=-fPIC
|
||||
LDFLAGS+=-static
|
||||
${DEFAULT_MAKE_CFLAGS}
|
||||
install)
|
||||
endif()
|
||||
|
1
third-party/cmake/BuildLibvterm.cmake
vendored
1
third-party/cmake/BuildLibvterm.cmake
vendored
@ -58,6 +58,7 @@ else()
|
||||
set(LIBVTERM_INSTALL_COMMAND ${MAKE_PRG} CC=${DEPS_C_COMPILER}
|
||||
PREFIX=${DEPS_INSTALL_DIR}
|
||||
CFLAGS=-fPIC
|
||||
LDFLAGS+=-static
|
||||
${DEFAULT_MAKE_CFLAGS}
|
||||
install)
|
||||
endif()
|
||||
|
1
third-party/cmake/BuildUnibilium.cmake
vendored
1
third-party/cmake/BuildUnibilium.cmake
vendored
@ -40,6 +40,7 @@ else()
|
||||
BUILD_COMMAND ${MAKE_PRG} CC=${DEPS_C_COMPILER}
|
||||
PREFIX=${DEPS_INSTALL_DIR}
|
||||
CFLAGS=-fPIC
|
||||
LDFLAGS+=-static
|
||||
INSTALL_COMMAND ${MAKE_PRG} PREFIX=${DEPS_INSTALL_DIR} install)
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user