mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
Compare commits
12 Commits
v0.4.4
...
release-0.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d9dd30a955 | ||
![]() |
b2cef8b665 | ||
![]() |
1de33ce2cd | ||
![]() |
1c3afe4e25 | ||
![]() |
b92399d008 | ||
![]() |
20070310a4 | ||
![]() |
c685a2ef48 | ||
![]() |
018ec2172b | ||
![]() |
87a88c8e42 | ||
![]() |
47b84599df | ||
![]() |
e813ec79c2 | ||
![]() |
40dc1ba85c |
@@ -1,17 +1,17 @@
|
|||||||
# sourcehut CI: https://builds.sr.ht/~jmk/neovim
|
# sourcehut CI: https://builds.sr.ht/~jmk/neovim
|
||||||
|
|
||||||
image: openbsd/6.5
|
image: openbsd/6.7
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
- autoconf-2.69p2
|
- autoconf-2.69p2
|
||||||
- automake-1.15.1
|
- automake-1.15.1
|
||||||
- cmake
|
- cmake
|
||||||
- gettext-0.19.8.1p3
|
- gettext-runtime-0.20.1p1
|
||||||
- gettext-tools-0.19.8.1
|
- gettext-tools-0.20.1p3
|
||||||
- gmake
|
- gmake
|
||||||
- libtool
|
- libtool
|
||||||
- ninja-1.8.2p0
|
- ninja-1.10.0
|
||||||
- unzip-6.0p11
|
- unzip-6.0p13
|
||||||
|
|
||||||
sources:
|
sources:
|
||||||
- https://github.com/neovim/neovim
|
- https://github.com/neovim/neovim
|
||||||
|
@@ -114,8 +114,8 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
|
|||||||
# version string, else they are combined with the result of `git describe`.
|
# version string, else they are combined with the result of `git describe`.
|
||||||
set(NVIM_VERSION_MAJOR 0)
|
set(NVIM_VERSION_MAJOR 0)
|
||||||
set(NVIM_VERSION_MINOR 4)
|
set(NVIM_VERSION_MINOR 4)
|
||||||
set(NVIM_VERSION_PATCH 4)
|
set(NVIM_VERSION_PATCH 5)
|
||||||
set(NVIM_VERSION_PRERELEASE "") # for package maintainers
|
set(NVIM_VERSION_PRERELEASE "-dev") # for package maintainers
|
||||||
|
|
||||||
# API level
|
# API level
|
||||||
set(NVIM_API_LEVEL 6) # Bump this after any API change.
|
set(NVIM_API_LEVEL 6) # Bump this after any API change.
|
||||||
|
@@ -5168,8 +5168,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
Note that such processing is done after |:set| did its own round of
|
Note that such processing is done after |:set| did its own round of
|
||||||
unescaping, so to keep yourself sane use |:let-&| like shown above.
|
unescaping, so to keep yourself sane use |:let-&| like shown above.
|
||||||
*shell-powershell*
|
*shell-powershell*
|
||||||
To use powershell (on Windows): >
|
To use powershell: >
|
||||||
set shell=powershell shellquote=( shellpipe=\| shellxquote=
|
let &shell = has('win32') ? 'powershell' : 'pwsh'
|
||||||
|
set shellquote= shellpipe=\| shellxquote=
|
||||||
set shellcmdflag=-NoLogo\ -NoProfile\ -ExecutionPolicy\ RemoteSigned\ -Command
|
set shellcmdflag=-NoLogo\ -NoProfile\ -ExecutionPolicy\ RemoteSigned\ -Command
|
||||||
set shellredir=\|\ Out-File\ -Encoding\ UTF8
|
set shellredir=\|\ Out-File\ -Encoding\ UTF8
|
||||||
|
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
</screenshots>
|
</screenshots>
|
||||||
|
|
||||||
<releases>
|
<releases>
|
||||||
|
<release date="2020-08-04" version="0.4.4"/>
|
||||||
<release date="2019-11-06" version="0.4.3"/>
|
<release date="2019-11-06" version="0.4.3"/>
|
||||||
<release date="2019-09-15" version="0.4.2"/>
|
<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.1"/>
|
||||||
|
@@ -12656,7 +12656,7 @@ static void libcall_common(typval_T *argvars, typval_T *rettv, int out_type)
|
|||||||
// input variables
|
// input variables
|
||||||
char *str_in = (in_type == VAR_STRING)
|
char *str_in = (in_type == VAR_STRING)
|
||||||
? (char *) argvars[2].vval.v_string : NULL;
|
? (char *) argvars[2].vval.v_string : NULL;
|
||||||
int64_t int_in = argvars[2].vval.v_number;
|
int int_in = argvars[2].vval.v_number;
|
||||||
|
|
||||||
// output variables
|
// output variables
|
||||||
char **str_out = (out_type == VAR_STRING)
|
char **str_out = (out_type == VAR_STRING)
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
typedef void (*gen_fn)(void);
|
typedef void (*gen_fn)(void);
|
||||||
typedef const char *(*str_str_fn)(const char *str);
|
typedef const char *(*str_str_fn)(const char *str);
|
||||||
typedef int (*str_int_fn)(const char *str);
|
typedef int (*str_int_fn)(const char *str);
|
||||||
typedef const char *(*int_str_fn)(int64_t i);
|
typedef const char *(*int_str_fn)(int i);
|
||||||
typedef int (*int_int_fn)(int64_t i);
|
typedef int (*int_int_fn)(int i);
|
||||||
|
|
||||||
/// os_libcall - call a function in a dynamic loadable library
|
/// os_libcall - call a function in a dynamic loadable library
|
||||||
///
|
///
|
||||||
@@ -41,7 +41,7 @@ typedef int (*int_int_fn)(int64_t i);
|
|||||||
bool os_libcall(const char *libname,
|
bool os_libcall(const char *libname,
|
||||||
const char *funcname,
|
const char *funcname,
|
||||||
const char *argv,
|
const char *argv,
|
||||||
int64_t argi,
|
int argi,
|
||||||
char **str_out,
|
char **str_out,
|
||||||
int *int_out)
|
int *int_out)
|
||||||
{
|
{
|
||||||
|
@@ -2692,8 +2692,8 @@ win_line (
|
|||||||
off += col;
|
off += col;
|
||||||
}
|
}
|
||||||
|
|
||||||
// wont highlight after 1024 columns
|
// wont highlight after TERM_ATTRS_MAX columns
|
||||||
int term_attrs[1024] = {0};
|
int term_attrs[TERM_ATTRS_MAX] = { 0 };
|
||||||
if (wp->w_buffer->terminal) {
|
if (wp->w_buffer->terminal) {
|
||||||
terminal_get_line_attributes(wp->w_buffer->terminal, wp, lnum, term_attrs);
|
terminal_get_line_attributes(wp->w_buffer->terminal, wp, lnum, term_attrs);
|
||||||
extra_check = true;
|
extra_check = true;
|
||||||
@@ -4030,7 +4030,7 @@ win_line (
|
|||||||
int n = wp->w_p_rl ? -1 : 1;
|
int n = wp->w_p_rl ? -1 : 1;
|
||||||
while (col >= 0 && col < grid->Columns) {
|
while (col >= 0 && col < grid->Columns) {
|
||||||
schar_from_ascii(linebuf_char[off], ' ');
|
schar_from_ascii(linebuf_char[off], ' ');
|
||||||
linebuf_attr[off] = term_attrs[vcol];
|
linebuf_attr[off] = vcol >= TERM_ATTRS_MAX ? 0 : term_attrs[vcol];
|
||||||
off += n;
|
off += n;
|
||||||
vcol += n;
|
vcol += n;
|
||||||
col += n;
|
col += n;
|
||||||
|
@@ -32,6 +32,9 @@ EXTERN ScreenGrid default_grid INIT(= SCREEN_GRID_INIT);
|
|||||||
|
|
||||||
#define DEFAULT_GRID_HANDLE 1 // handle for the default_grid
|
#define DEFAULT_GRID_HANDLE 1 // handle for the default_grid
|
||||||
|
|
||||||
|
// Maximum columns for terminal highlight attributes
|
||||||
|
#define TERM_ATTRS_MAX 1024
|
||||||
|
|
||||||
/// Status line click definition
|
/// Status line click definition
|
||||||
typedef struct {
|
typedef struct {
|
||||||
enum {
|
enum {
|
||||||
|
@@ -588,6 +588,7 @@ void terminal_get_line_attributes(Terminal *term, win_T *wp, int linenr,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
width = MIN(TERM_ATTRS_MAX, width);
|
||||||
for (int col = 0; col < width; col++) {
|
for (int col = 0; col < width; col++) {
|
||||||
VTermScreenCell cell;
|
VTermScreenCell cell;
|
||||||
bool color_valid = fetch_cell(term, row, col, &cell);
|
bool color_valid = fetch_cell(term, row, col, &cell);
|
||||||
|
@@ -500,9 +500,20 @@ function module.source(code)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function module.set_shell_powershell()
|
function module.set_shell_powershell()
|
||||||
|
local shell = iswin() and 'powershell' or 'pwsh'
|
||||||
|
if not module.eval('executable("'..shell..'")') then
|
||||||
|
error(shell..' is not executable')
|
||||||
|
end
|
||||||
|
local aliases = iswin() and {'cat', 'sleep'} or {}
|
||||||
|
local cmd = ''
|
||||||
|
for _, alias in ipairs(aliases) do
|
||||||
|
cmd = cmd .. 'Remove-Item -Force alias:' .. alias .. ';'
|
||||||
|
end
|
||||||
module.source([[
|
module.source([[
|
||||||
set shell=powershell shellquote=( shellpipe=\| shellredir=> shellxquote=
|
let &shell = ']]..shell..[['
|
||||||
let &shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command Remove-Item -Force alias:sleep; Remove-Item -Force alias:cat;'
|
set shellquote= shellpipe=\| shellxquote=
|
||||||
|
let &shellredir = '| Out-File -Encoding UTF8'
|
||||||
|
let &shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command ]]..cmd..[['
|
||||||
]])
|
]])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -264,3 +264,12 @@ describe('No heap-buffer-overflow when using', function()
|
|||||||
feed_command('bdelete!')
|
feed_command('bdelete!')
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
describe('No heap-buffer-overflow when', function()
|
||||||
|
it('set nowrap and send long line #11548', function()
|
||||||
|
feed_command('set nowrap')
|
||||||
|
feed_command('autocmd TermOpen * startinsert')
|
||||||
|
feed_command('call feedkeys("4000ai\\<esc>:terminal!\\<cr>")')
|
||||||
|
eq(2, eval('1+1'))
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
@@ -10,6 +10,7 @@ local iswin = helpers.iswin
|
|||||||
local clear = helpers.clear
|
local clear = helpers.clear
|
||||||
local command = helpers.command
|
local command = helpers.command
|
||||||
local nvim_dir = helpers.nvim_dir
|
local nvim_dir = helpers.nvim_dir
|
||||||
|
local set_shell_powershell = helpers.set_shell_powershell
|
||||||
|
|
||||||
describe("shell command :!", function()
|
describe("shell command :!", function()
|
||||||
local screen
|
local screen
|
||||||
@@ -230,4 +231,19 @@ describe("shell command :!", function()
|
|||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
if iswin() or eval('executable("pwsh")') == 1 then
|
||||||
|
it('powershell supports literal strings', function()
|
||||||
|
set_shell_powershell()
|
||||||
|
local screen = Screen.new(30, 4)
|
||||||
|
screen:attach()
|
||||||
|
feed_command([[!'echo $a']])
|
||||||
|
screen:expect{any='\necho %$a', timeout=10000}
|
||||||
|
feed_command([[!$a = 1; echo '$a']])
|
||||||
|
screen:expect{any='\n%$a', timeout=10000}
|
||||||
|
feed_command([[!"echo $a"]])
|
||||||
|
screen:expect{any='\necho', timeout=10000}
|
||||||
|
feed_command([[!$a = 1; echo "$a"]])
|
||||||
|
screen:expect{any='\n1', timeout=10000}
|
||||||
|
end)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
4
third-party/CMakeLists.txt
vendored
4
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_URL http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.21.1.tar.gz)
|
||||||
set(LIBTERMKEY_SHA256 cecbf737f35d18f433c8d7864f63c0f878af41f8bd0255a3ebb16010dc044d5f)
|
set(LIBTERMKEY_SHA256 cecbf737f35d18f433c8d7864f63c0f878af41f8bd0255a3ebb16010dc044d5f)
|
||||||
|
|
||||||
set(LIBVTERM_URL https://github.com/neovim/libvterm/archive/7c72294d84ce20da4c27362dbd7fa4b08cfc91da.tar.gz)
|
set(LIBVTERM_URL http://www.leonerd.org.uk/code/libvterm/libvterm-0.1.4.tar.gz)
|
||||||
set(LIBVTERM_SHA256 f30c4d43e0c6db3e0912daf7188d98fbf6ee88f97589d72f6f304e5db48826a8)
|
set(LIBVTERM_SHA256 bc70349e95559c667672fc8c55b9527d9db9ada0fb80a3beda533418d782d3dd)
|
||||||
|
|
||||||
set(LUV_VERSION 1.30.0-0)
|
set(LUV_VERSION 1.30.0-0)
|
||||||
set(LUV_URL https://github.com/luvit/luv/archive/${LUV_VERSION}.tar.gz)
|
set(LUV_URL https://github.com/luvit/luv/archive/${LUV_VERSION}.tar.gz)
|
||||||
|
1
third-party/cmake/BuildLibvterm.cmake
vendored
1
third-party/cmake/BuildLibvterm.cmake
vendored
@@ -27,7 +27,6 @@ function(BuildLibvterm)
|
|||||||
-DUSE_EXISTING_SRC_DIR=${USE_EXISTING_SRC_DIR}
|
-DUSE_EXISTING_SRC_DIR=${USE_EXISTING_SRC_DIR}
|
||||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake
|
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake
|
||||||
PATCH_COMMAND "${_libvterm_PATCH_COMMAND}"
|
PATCH_COMMAND "${_libvterm_PATCH_COMMAND}"
|
||||||
CONFIGURE_COMMAND ""
|
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
CONFIGURE_COMMAND "${_libvterm_CONFIGURE_COMMAND}"
|
CONFIGURE_COMMAND "${_libvterm_CONFIGURE_COMMAND}"
|
||||||
BUILD_COMMAND "${_libvterm_BUILD_COMMAND}"
|
BUILD_COMMAND "${_libvterm_BUILD_COMMAND}"
|
||||||
|
Reference in New Issue
Block a user