unix-paste-bug
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- cli
Research direction
Start in lem/frontends/ncurses/clipboard.lisp and inspect *unix-paste-commands* and the WSL paste-aux method mentioned in the issue. Check how wl-paste output and the WSL trailing newline are handled, then run the clipboard-related tests if available. Done means pasting no longer adds an unwanted tail while legitimate pasted text remains intact.
Written by the indexing model from the issue text.
Description
Phenomenon:When build both webview and ncurses ,pasting text will add a #\Newline tail in pasted text。
Reason :wl-paste default output adds #\Newline which called in lem/frontends/ncurses/clipboard.lisp using unix-paste-commands。
Repair suggestion:
change
(defparameter *unix-paste-commands*
'(("wl-paste" "--no-newline")
("xsel" "--output" "--clipboard")
("xclip" "-out" "-selection" "clipboard")))
to
(defparameter *unix-paste-commands*
'(("wl-paste")
("xsel" "--output" "--clipboard")
("xclip" "-out" "-selection" "clipboard")))
There's code which perhaps want to fix this bug in WSL。
(when (and (plusp (length text))
(char= #\newline (char text (1- (length text)))))
(setf text (subseq text 0 (1- (length text)))))
in
(defmethod paste-aux ((os wsl))
(let ((text (execute-paste '("powershell.exe" "Get-Clipboard"))))
(setf text (ppcre:regex-replace-all "\\r" text ""))
(when (and (plusp (length text))
(char= #\newline (char text (1- (length text)))))
(setf text (subseq text 0 (1- (length text)))))
text))
I think it need to be deleted。
- Dominant language
- Common Lisp
- Stars
- 3.1k
- Forks
- 261
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 117
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lem-project/lem
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
lem-project/lem#2525 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
lem-project/lem#2524 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
lem-project/lem#2488 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
lem-project/lem#2369 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
lem-project/lem#2321 · 2 reactions ·
Maintainers usually reply within 1 day
Similar issues
-
convert says pages may not match Word's even when the output is never laid out (DOCX, ODT, TXT…)Openbugfix
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
fix(board): the terminal board's line above the list shows each key hint once and fits the widthOpenusersim
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
WenyuChiou/agent-board#2312 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
GitHub registry install via `gh` credentials rewrites `\u0000`–`\u001f` escapes in source files to `^@`–`^_`Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 2 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ajithakdev/claude-desktop-rpm#43 ·
Maintainers usually reply within 1 day