Skip to content
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

Long commit message bodies start erasing previous lines in OSX terminal #688

Closed
1 of 4 tasks
fruchtose opened this issue Jun 11, 2019 · 1 comment · Fixed by #2697
Closed
1 of 4 tasks

Long commit message bodies start erasing previous lines in OSX terminal #688

fruchtose opened this issue Jun 11, 2019 · 1 comment · Fixed by #2697

Comments

@fruchtose
Copy link

Expected Behavior

I'm using Terminal on OSX. When I'm writing a commit body which goes beyond my current line length, the prompt does something weird. I would expect the editor to handle wrapped text, but it currently has a bug where wrapped text is shown in a new line in the terminal.

Current Behavior

The wrapping text replaces whatever text content is on the previous line, with newly typed characters being appended to the end. This repeats for every new character. So for example, writing the text available for Thrift would have wrapped in my editor at ble for Thrift. This results in the following text replacing the last 20 lines in my terminal with the following:

ble for Thr
ble for Th
ble for Th
ble for T
ble for T
ble for 
ble for 
ble for
ble for
ble fo
ble fo
ble f
ble f
ble 
ble 
ble
ble
bl
bl
b

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

Steps to Reproduce (for bugs)

Dependencies:

{
    "@commitlint/cli": "^7.6.1",
    "@commitlint/config-conventional": "^7.1.2",
    "@commitlint/prompt-cli": "^7.6.1",
}
  1. Set up prompt-cli in a repo
  2. Map the package.json script commit to the command string commit
  3. Run npm run commit
  4. Start typing a commit message, so that the body wraps around the terminal.
commitlint.config.js ```js { "extends": [ "@commitlint/config-conventional" ] } ```

Context

This bug makes it difficult to use the CLI for long commit messages.

Your Environment

OSX 10.12

Executable Version
commitlint --version 7.6.1
git --version 2.14.3
node --version 12.2.0
@marionebl
Copy link
Contributor

Blocked by #86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants