lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Pasting into the commit description discards newlines

Open SchnozzleCat opened this issue 1 year ago • 1 comments

Describe the bug When pasting into from the clipboard into the commit description field, any newlines will be discarded and the entire text will end up on one line.

To Reproduce Steps to reproduce the behavior:

  1. Copy the following:
- This is a description for a change
- This is a description for another change
- This is a description for yet another change
  1. Paste it into the commit description with ctrl+shift+v
  2. See text on one line

Expected behavior Line breaks are kept

Screenshots image

Version info: commit=, build date=, build source=nix, version=0.40.2, os=linux, arch=amd64, git version=2.43.2 git version 2.43.2

SchnozzleCat avatar Mar 19 '24 21:03 SchnozzleCat

Can't reproduce, works as expected for me on Mac (both in the 0.40.2 release and on master).

Also, I don't think this is lazygit's fault. Lazygit just handles the events that are sent to it by the terminal, and it can't distinguish whether they are typed manually or pasted. It looks to me like your terminal doesn't send those linefeeds for some reason.

Does it work correctly if you paste into something like nano?

stefanhaller avatar Mar 20 '24 07:03 stefanhaller