jesseduffield / jesseduffield/lazygit

Alt+enter toggles fullscreen, when trying to add commit message newline

Open
#1,700 2 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Describe the bug**
(Only applicable to some OS/terminals)
When writing the commit message, newline cannot be added because the alt+enter key is consumed by the window. Alt+enter is a hotkey to toggle fullscreen.

**To Reproduce**
Steps to reproduce the behavior:
1. Be on Windows
2. Open lazygit in either of these terminals: cygwin tty, cmd.exe, PowerShell
3. Initialize the commit creation (press c)
4. Try to add a newline to the commit message (press alt+enter)
5. Notice that no newline was added to the commit message, and that you now toggled fullscreen on the terminal

**Expected behavior**
Expected a newline character to be inserted into the commit message dialog.

**Desktop (please complete the following information):**
- OS: [e.g. Windows]
- Lazygit Version [e.g. v0.1.45]
- The last commit id if you built project from sources (run : ```git-rev parse HEAD```)

**Additional context**
Propsed solution: I would expect **shift**+enter to be the "insert newline" key for the dialog. Shift+enter is a very common choice for UIs to add a newline, when enter is taken for something else (like "confirm" or "send").

Consider chat services like Slack, Teams, Facebook Messenger. Enter is "send" and **shift**+enter is "add newline".

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.