From f44d1ed8354ba5ca1dc040ee6f709dfc31959704 Mon Sep 17 00:00:00 2001 From: Michael Bleuez Date: Tue, 30 Dec 2025 12:16:32 +0100 Subject: [PATCH 1/5] rm uneeded stuff --- src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 10b49a3..fc9b7cd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -552,9 +552,6 @@ pub fn start() { // normal, unique result display(result, event_handler2.nvim, &mut event_handler2.data); } - - //clean data - event_handler2.data = DataHolder::new(); }))); } Messages::Clean => { From dd2884d36df025d757ff4d188df139ad65fc1cd1 Mon Sep 17 00:00:00 2001 From: Michael Bleuez Date: Tue, 30 Dec 2025 12:20:17 +0100 Subject: [PATCH 2/5] next beta --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1b5cd56..f5eca59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -350,9 +350,9 @@ checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" [[package]] name = "libredox" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df15f6eac291ed1cf25865b1ee60399f57e7c227e7f51bdbd4c5270396a9ed50" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ "bitflags", "libc", @@ -818,7 +818,7 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "sniprun" -version = "1.3.21" +version = "1.3.22-beta" dependencies = [ "backtrace", "close_fds", diff --git a/Cargo.toml b/Cargo.toml index 4534699..4858cb2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sniprun" -version = "1.3.21" +version = "1.3.22-beta" authors = ["michaelb "] rust-version = "1.65" edition = "2018" From 74d0e972c9017e8d04c8ce8ab1dbe76ce44ff6c2 Mon Sep 17 00:00:00 2001 From: Michael Bleuez Date: Mon, 23 Feb 2026 19:38:17 +0100 Subject: [PATCH 3/5] max fw width --- doc/sources/README.md | 1 + lua/sniprun.lua | 1 + lua/sniprun/display.lua | 12 ++++++++---- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/sources/README.md b/doc/sources/README.md index 1ea74ac..3ba74a6 100755 --- a/doc/sources/README.md +++ b/doc/sources/README.md @@ -281,6 +281,7 @@ require'sniprun'.setup({ terminal_width = 45, --# change the terminal display option width (if vertical) terminal_height = 20, --# change the terminal display option height (if horizontal) notification_timeout = 5 --# timeout for nvim_notify output + max_fw_width = 80, --# max width for floating windows, longer lines will wrap }, --# You can use the same keys to customize whether a sniprun producing diff --git a/lua/sniprun.lua b/lua/sniprun.lua index 2c5d460..a90a7f5 100644 --- a/lua/sniprun.lua +++ b/lua/sniprun.lua @@ -41,6 +41,7 @@ M.config_values = { terminal_height = 20, -- change the terminal display option heigth (if horizontal) notification_timeout = 5, -- timeout for nvim_notify output notification_render = "default", -- nvim_notify style + max_fw_width = 80, -- max width of floating windows. Longer text gets wrapped }, show_no_output = { diff --git a/lua/sniprun/display.lua b/lua/sniprun/display.lua index 4d9beee..8c419e4 100644 --- a/lua/sniprun/display.lua +++ b/lua/sniprun/display.lua @@ -19,25 +19,29 @@ function M.fw_open(row, column, message, ok, temp) local namespace_id = vim.api.nvim_create_namespace(NAMESPACE) local w = 0 - local h = -1 + local h = 0 local bp = { row, column } local bufnr = vim.api.nvim_create_buf(false, true) + + local max_width = math.max(require("sniprun").config_values.display_options.max_fw_width, 1) for line in message:gmatch("([^\n]*)\n?") do - h = h + 1 - w = math.max(w, string.len(line)) vim.api.nvim_buf_set_lines(bufnr, h, h + 1, false, { line }) + h = h + (1 + math.floor((string.len(line) - 1) / max_width)) -- account for lines which will wrap + w = math.max(w, string.len(line)) vim.api.nvim_buf_add_highlight(bufnr, namespace_id, hl, h, 0, -1) -- highlight lines in floating window end + if h ~= 0 then M.fw_handle = vim.api.nvim_open_win(bufnr, false, { relative = "win", - width = w + 1, + width = math.min(w, max_width), height = h, bufpos = bp, focusable = false, style = "minimal", border = M.borders, }) + vim.api.nvim_set_option_value("wrap", true, { win = M.fw_handle }) end end From 6756b3b6003faa787ab0f1f3fdd4bf2a1d2dfc13 Mon Sep 17 00:00:00 2001 From: Michael Bleuez Date: Thu, 26 Feb 2026 19:17:00 +0100 Subject: [PATCH 4/5] update to new version --- CHANGELOG.md | 3 +++ Cargo.lock | 38 +++++++++++++++++++------------------- Cargo.toml | 2 +- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67e7a4e..1b94cfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v1.3.22 +- Wrap long lines in FloatingWindow display mode + ## v1.3.21 - Settable current working directory - Fix window/terminal close bug diff --git a/Cargo.lock b/Cargo.lock index f5eca59..1414249 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -332,9 +332,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "lazy_static" @@ -344,9 +344,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.178" +version = "0.2.182" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" +checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" [[package]] name = "libredox" @@ -370,9 +370,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.28" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "log-panics" @@ -500,18 +500,18 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "proc-macro2" -version = "1.0.102" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e0f6df8eaa422d97d72edcd152e1451618fed47fabbdbd5a8864167b1d4aff7" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.41" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] @@ -609,9 +609,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" +checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" [[package]] name = "rustls" @@ -658,9 +658,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" [[package]] name = "schannel" @@ -818,7 +818,7 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "sniprun" -version = "1.3.22-beta" +version = "1.3.22" dependencies = [ "backtrace", "close_fds", @@ -919,9 +919,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-normalization" diff --git a/Cargo.toml b/Cargo.toml index 4858cb2..05259f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sniprun" -version = "1.3.22-beta" +version = "1.3.22" authors = ["michaelb "] rust-version = "1.65" edition = "2018" From 3d26e3b032e998230c93d20d2c9bd676def0e63d Mon Sep 17 00:00:00 2001 From: Michael Bleuez Date: Thu, 26 Feb 2026 20:09:16 +0100 Subject: [PATCH 5/5] pin proc-macro, log, quote ryu, unicode-ident to specific version (MSRV) --- CHECKLIST.md | 6 ++++++ Cargo.lock | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/CHECKLIST.md b/CHECKLIST.md index 02a17d8..1b907cf 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md @@ -14,6 +14,12 @@ But alas some packages must be downgraded to respect MSRV, see Cargo.toml and add to the list if (when) necessary: - cargo update -p syn@2.0.108 --precise 2.0.106 +- cargo update -p ryu@1.0.22 --precise 1.0.20 +- cargo update -p unicode-ident@1.0.24 --precise 1.0.20 +- cargo update -p quote@1.0.44 --precise 1.0.41 +- cargo update -p log@0.4.29 --precise 0.4.28 +- cargo update -p itoa@1.0.17 --precise 1.0.15 + - cargo update -p proc-macro2@1.0.106 --precise 1.0.102 ## Merge process - create a PR dev -> master diff --git a/Cargo.lock b/Cargo.lock index 1414249..3d266ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -332,9 +332,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.17" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "lazy_static" @@ -370,9 +370,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "log-panics" @@ -500,18 +500,18 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "8e0f6df8eaa422d97d72edcd152e1451618fed47fabbdbd5a8864167b1d4aff7" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.44" +version = "1.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" dependencies = [ "proc-macro2", ] @@ -658,9 +658,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.22" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "schannel" @@ -919,9 +919,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.24" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" +checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" [[package]] name = "unicode-normalization"