Compare commits
22 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ab5d6c239 | ||
|
|
47309f567e | ||
|
|
55a18fe030 | ||
|
|
fa5f2634dc | ||
|
|
bb401a97e1 | ||
|
|
61a752855d | ||
|
|
e7abded324 | ||
|
|
8e74976222 | ||
|
|
f55412e548 | ||
|
|
7632557ef3 | ||
|
|
3b6216a3a1 | ||
|
|
cf3a859077 | ||
|
|
18b182b058 | ||
|
|
c76283df29 | ||
|
|
f89541a8ee | ||
|
|
6ad8efa528 | ||
|
|
7d26b127aa | ||
|
|
a1d149da1f | ||
|
|
f891d52c8d | ||
|
|
36cf7ce115 | ||
|
|
9d003ba0a5 | ||
|
|
363471541c |
7 changed files with 314 additions and 212 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
@ -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')
|
||||
|
|
|
|||
384
neovim.spec
384
neovim.spec
File diff suppressed because it is too large
Load diff
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (neovim-0.7.2.tar.gz) = 04d0fa5b23018531b70b53271821bf6944cde1bcec2210b99f5888e1339cd38f57feaa8e40874a3a504930e6614980947f31852185cbcd2ce106a0867896dd79
|
||||
SHA512 (neovim-0.9.1.tar.gz) = 339efd3d8c1a73aa3b43e8770d6943aeba9e4ce6a3598c0424e388f80759d50b14aa7c60fd435bf2d17997476e06d28b79e7e98670d02ca9ceec031841e8b9b8
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Name:
|
||||
Version:
|
||||
Release: 1%{?dist}
|
||||
Release: %{autorelease}
|
||||
Summary:
|
||||
|
||||
License:
|
||||
|
|
@ -35,3 +35,4 @@ Requires:
|
|||
|
||||
|
||||
%changelog
|
||||
%{autochangelog}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue