jesseduffield / lazygit

simple terminal UI for git commands

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pasting into the commit description discards newlines

SchnozzleCat opened this issue · 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

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?