Compare commits

...
Sign in to create a new pull request.

22 commits

Author SHA1 Message Date
Andreas Schneider
1ab5d6c239 Remove linker hack 2023-06-05 07:49:10 +02:00
Andreas Schneider
47309f567e Update to version 0.9.1 2023-05-31 13:05:22 +02:00
Andreas Schneider
55a18fe030 Improve semantic token performance and fix applying patches
related: rhbz#2188229
2023-05-02 09:25:32 +02:00
Andreas Schneider
fa5f2634dc Fix buffer overflow for user command
resolves: rhbz#2188229
2023-04-22 08:19:38 +02:00
Andreas Schneider
bb401a97e1 Use pkgconfig for BR and recommend wl-clipboard 2023-04-22 08:19:37 +02:00
Andreas Schneider
61a752855d Update neovim-lua-bit32.patch 2023-04-07 19:58:39 +02:00
Andreas Schneider
e7abded324 Update to version 0.9.0 2023-04-07 19:58:37 +02:00
Andreas Schneider
8e74976222 Fix snprintf buffer overflow with tags
resolves: rhbz#2181836
2023-03-27 09:02:16 +02:00
Andreas Schneider
f55412e548 Fix snprintf buffer overflow
resolves: rhbz#2165805
2023-03-25 21:28:38 +01:00
Andreas Schneider
7632557ef3 New build for SPDX expression 2023-03-25 21:28:37 +01:00
Andreas Schneider
3b6216a3a1 Update spec-template
https://fedoraproject.org/wiki/Changes/Rpmautospec_by_Default
2023-03-25 21:28:35 +01:00
Andreas Schneider
cf3a859077 Update License to SPDX expressions
https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_1
2023-03-25 21:28:34 +01:00
Andreas Schneider
18b182b058 Update to version 0.8.3 2023-02-02 15:41:05 +01:00
Andreas Schneider
c76283df29 Update to version 0.8.2 2022-12-30 10:52:52 +01:00
Andreas Schneider
f89541a8ee Recommend tree-sitter-cli 2022-11-15 10:11:10 +01:00
Andreas Schneider
6ad8efa528 Update to version 0.8.1 2022-11-14 17:44:23 +01:00
Andreas Schneider
7d26b127aa Update patches for s390 and ppc 2022-10-01 07:17:30 +02:00
Andreas Schneider
a1d149da1f Update to version 0.8.0 2022-09-30 23:52:57 +02:00
Andreas Schneider
f891d52c8d Fix libvterm 0.3 patch 2022-09-21 15:03:10 +02:00
Andreas Schneider
36cf7ce115 Fix typo 2022-09-21 15:03:08 +02:00
Andreas Schneider
9d003ba0a5 Build with libvterm 0.3 2022-09-21 15:03:05 +02:00
Michel Alexandre Salim
363471541c Enforce the minimum tree-sitter version at runtime (Fixes: rhbz#2100577)
Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
2022-08-26 14:29:41 +02:00
7 changed files with 314 additions and 212 deletions

6
.gitignore vendored
View file

@ -20,3 +20,9 @@
/neovim-0.6.1.tar.gz
/neovim-0.7.0.tar.gz
/neovim-0.7.2.tar.gz
/neovim-0.8.0.tar.gz
/neovim-0.8.1.tar.gz
/neovim-0.8.2.tar.gz
/neovim-0.8.3.tar.gz
/neovim-0.9.0.tar.gz
/neovim-0.9.1.tar.gz

View file

@ -1,13 +0,0 @@
Index: neovim-0.5.0/CMakeLists.txt
===================================================================
--- neovim-0.5.0.orig/CMakeLists.txt
+++ neovim-0.5.0/CMakeLists.txt
@@ -413,7 +413,7 @@ endif()
option(PREFER_LUA "Prefer Lua over LuaJIT in the nvim executable." OFF)
if(PREFER_LUA)
- find_package(Lua 5.1 REQUIRED)
+ find_package(Lua 5.1 EXACT REQUIRED)
set(LUA_PREFERRED_INCLUDE_DIRS ${LUA_INCLUDE_DIR})
set(LUA_PREFERRED_LIBRARIES ${LUA_LIBRARIES})
# Passive (not REQUIRED): if LUAJIT_FOUND is not set, nvim-test is skipped.

View file

@ -1,94 +0,0 @@
From 7a1b90ed10e7626d061ee0ba7b0b321151c44c7d Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
Date: Tue, 8 Feb 2022 18:58:36 +0100
Subject: [PATCH 1/2] refactor(term): use const for title and add len to
buf_set_term_title()
---
src/nvim/terminal.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: neovim-0.6.1/src/nvim/terminal.c
===================================================================
--- neovim-0.6.1.orig/src/nvim/terminal.c 2022-02-09 21:11:11.374493070 +0100
+++ neovim-0.6.1/src/nvim/terminal.c 2022-02-09 21:11:11.407493071 +0100
@@ -118,6 +118,10 @@ struct terminal {
// window height has increased) and must be deleted from the terminal buffer
int sb_pending;
+ char *title; // VTermStringFragment buffer
+ size_t title_len; // number of rows pushed to sb_buffer
+ size_t title_size; // sb_buffer size
+
// buf_T instance that acts as a "drawing surface" for libvterm
// we can't store a direct reference to the buffer because the
// refresh_timer_cb may be called after the buffer was freed, and there's
@@ -222,7 +226,7 @@ Terminal *terminal_open(buf_T *buf, Term
set_option_value("wrap", false, NULL, OPT_LOCAL);
set_option_value("list", false, NULL, OPT_LOCAL);
if (buf->b_ffname != NULL) {
- buf_set_term_title(buf, (char *)buf->b_ffname);
+ buf_set_term_title(buf, (char *)buf->b_ffname, strlen((char *)buf->b_ffname));
}
RESET_BINDING(curwin);
// Reset cursor in current window.
@@ -588,6 +592,7 @@ void terminal_destroy(Terminal *term)
xfree(term->sb_buffer[i]);
}
xfree(term->sb_buffer);
+ xfree(term->title);
vterm_free(term->vt);
xfree(term);
}
@@ -810,13 +815,13 @@ static int term_movecursor(VTermPos new,
return 1;
}
-static void buf_set_term_title(buf_T *buf, char *title)
+static void buf_set_term_title(buf_T *buf, const char *title, size_t len)
FUNC_ATTR_NONNULL_ALL
{
Error err = ERROR_INIT;
dict_set_var(buf->b_vars,
STATIC_CSTR_AS_STRING("term_title"),
- STRING_OBJ(cstr_as_string(title)),
+ STRING_OBJ(((String){ .data = (char *)title, .size = len })),
false,
false,
&err);
@@ -839,7 +844,34 @@ static int term_settermprop(VTermProp pr
case VTERM_PROP_TITLE: {
buf_T *buf = handle_get_buffer(term->buf_handle);
- buf_set_term_title(buf, val->string);
+#if VTERM_VERSION_MAJOR > 0 || (VTERM_VERSION_MAJOR == 0 && VTERM_VERSION_MINOR >= 2)
+ VTermStringFragment frag = val->string;
+
+ if (frag.initial && frag.final) {
+ buf_set_term_title(buf, frag.str, frag.len);
+ break;
+ }
+
+ if (frag.initial) {
+ term->title_len = 0;
+ term->title_size = MAX(frag.len, 1024);
+ term->title = xmalloc(sizeof(char *) * term->title_size);
+ } else if (term->title_len + frag.len > term->title_size) {
+ term->title_size *= 2;
+ term->title = xrealloc(term->title, sizeof(char *) * term->title_size);
+ }
+
+ memcpy(term->title + term->title_len, frag.str, frag.len);
+ term->title_len += frag.len;
+
+ if (frag.final) {
+ buf_set_term_title(buf, term->title, term->title_len);
+ xfree(term->title);
+ term->title = NULL;
+ }
+#else
+ buf_set_term_title(buf, val->string, strlen(val->string));
+#endif
break;
}

View file

@ -1,30 +1,30 @@
Index: neovim-0.5.0/CMakeLists.txt
Index: neovim-0.9.0/CMakeLists.txt
===================================================================
--- neovim-0.5.0.orig/CMakeLists.txt
+++ neovim-0.5.0/CMakeLists.txt
@@ -517,7 +517,7 @@ endforeach()
--- neovim-0.9.0.orig/CMakeLists.txt 2023-04-07 18:47:09.146841186 +0200
+++ neovim-0.9.0/CMakeLists.txt 2023-04-07 18:47:39.100006585 +0200
@@ -163,7 +163,7 @@ foreach(CFGNAME ${CMAKE_CONFIGURATION_TY
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/lib)
endforeach()
# Find Lua interpreter
include(LuaHelpers)
-set(LUA_DEPENDENCIES lpeg mpack bit)
+set(LUA_DEPENDENCIES lpeg mpack bit32)
if(NOT LUA_PRG)
foreach(CURRENT_LUA_PRG luajit lua5.1 lua5.2 lua)
unset(_CHECK_LUA_PRG CACHE)
Index: neovim-0.5.0/src/nvim/ex_cmds.lua
Index: neovim-0.9.0/src/nvim/ex_cmds.lua
===================================================================
--- neovim-0.5.0.orig/src/nvim/ex_cmds.lua
+++ neovim-0.5.0/src/nvim/ex_cmds.lua
--- neovim-0.9.0.orig/src/nvim/ex_cmds.lua 2023-04-07 18:47:05.066818656 +0200
+++ neovim-0.9.0/src/nvim/ex_cmds.lua 2023-04-07 18:47:09.147841191 +0200
@@ -1,4 +1,4 @@
-local bit = require 'bit'
+local bit = require 'bit32'
local module = {}
Index: neovim-0.5.0/src/nvim/generators/gen_ex_cmds.lua
Index: neovim-0.9.0/src/nvim/generators/gen_ex_cmds.lua
===================================================================
--- neovim-0.5.0.orig/src/nvim/generators/gen_ex_cmds.lua
+++ neovim-0.5.0/src/nvim/generators/gen_ex_cmds.lua
--- neovim-0.9.0.orig/src/nvim/generators/gen_ex_cmds.lua 2023-04-07 18:47:05.066818656 +0200
+++ neovim-0.9.0/src/nvim/generators/gen_ex_cmds.lua 2023-04-07 18:47:09.147841191 +0200
@@ -22,7 +22,7 @@ local defsfname = autodir .. '/ex_cmds_d
local enumfile = io.open(enumfname, 'w')
local defsfile = io.open(defsfname, 'w')

File diff suppressed because it is too large Load diff

View file

@ -1 +1 @@
SHA512 (neovim-0.7.2.tar.gz) = 04d0fa5b23018531b70b53271821bf6944cde1bcec2210b99f5888e1339cd38f57feaa8e40874a3a504930e6614980947f31852185cbcd2ce106a0867896dd79
SHA512 (neovim-0.9.1.tar.gz) = 339efd3d8c1a73aa3b43e8770d6943aeba9e4ce6a3598c0424e388f80759d50b14aa7c60fd435bf2d17997476e06d28b79e7e98670d02ca9ceec031841e8b9b8

View file

@ -1,6 +1,6 @@
Name:
Version:
Release: 1%{?dist}
Release: %{autorelease}
Summary:
License:
@ -35,3 +35,4 @@ Requires:
%changelog
%{autochangelog}