-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pasting via the right-click menu inserts junk #1317
Comments
Can't repro for me. 2024-07-01-23-52-35.mp4 |
Really can't repro 2024-07-02-21-57-59.mp4 |
i'm not sure if i hit the similar issue, but i also encounter some weird "copy-pasting" when ssh to remote nvim via windows too. the "copy-pasting" issue i mentioned above is that remote nvim will paste whatever in the latest registry when i ssh to it on windows.( but this issue never happened on macos |
I can reproduce this on my setup. I'll try a minimal setup later to see if the issue is still there. |
@CharlesChiuGit What do u mean by the "latest registry"? r u referring to the |
ys, the bulit-in register in nvim sorry! typo lol |
Native nvim does not have this problem. |
I think I've tracked down the cause. @yinghaoyu Can u please confirm if the following minimal local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
require("lazy").setup({ "dstein64/nvim-scrollview" }, {
root = root .. "/plugins",
})
-- add anything else here
vim.g.mapleader = " "
vim.api.nvim_set_keymap("n", "<leader>r", "<Cmd>noh<CR>", {}) Use |
@CharlesChiuGit Nah u might wanna switch ur clipboard provider for remote sessions as Windows Terminal really sucks with escape codes lol |
i used wezterm on windows and encountered this issue lol |
Hmm I think detailed help logs could be super helpful here. It can be caused by just about anything in our config :( I figured out what's going on here by checking the logs and saw that |
I'm gonna report this upstream first lol as I don't think this is an issue with our config. |
Should be fixed by dstein64/nvim-scrollview@30ca6e1. |
So quickly like a bat out of hell, Hahaha. |
could u give me some tips on finding the related log files or how to locate the user input? tks in advanced! |
Sure! Generally, the pattern is: nvim -V[log-level][log-file] [...] where log-level can be one of the following: 0 -- don't display any messages
1 -- display when viminfo file is read or written
2 -- display sourced files
5 -- display every searched tag-file
8 -- display files that trigger autocommands
9 -- display every triggered autocommand
12 -- display every executed function
13 -- report every thrown, caught, finished, or discarded exception
14 -- display anything pending in a :finally clause
15 -- display every executed ex-command I would recommend 15 anyway as changes to the register(s) are only recorded at this level and beyond. For example, the following command would store the logs in nvim -V10log.txt [...] But locating the exact spot in the log file where the error occurred is much trickier lol my approach for getting an approximation is by:
truncate -c -s 0 [log-file]
Now that u probably have some information about the issue, go ahead and use a minimal config to test it! Hope this helps lol |
i think there might be something wrong with my terminal/shell/ssh setting. |
well... i sorta avoid above issue... sorta... lol while solving this issue, i also found out an interesting thing, which is to use |
Nah I really think this is related to how escape sequences are handled on Windows lol As long as the same set of APIs is used, the result should be the same regardless of the terminal. Check out this KB Article.
... and be sure to report back here if u find something worth sharing!
Hmm was it bc of some environment thingy? This really sounds like a mismatch between the btw, u could also check out this SO answer that gives a concise overview of the shells on Windows. Along those lines, I also think installing a UNIX layer (at least a POSIX-compliant one) on Windows is extremely important as it really makes development a lot easier lmao
lol this sounds so coooooool! |
Version confirmation
Following prerequisites
Not a user config issue
Neovim version
NVIM v0.10.0
Operating system/version
wsl-ubuntu20.04
Terminal name/version
windows terminal
$TERM environment variable
No response
Branch info
main (Default/Latest)
Fetch Preferences
SSH (use_ssh = true)
How to reproduce the issue
Using your mouse to select the text and copy it, then you can see
re("scrollview").handle_mouse("left", true)
pasted.Expected behavior
No extra operation
Actual behavior
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: