lintingzhen / commitizen-go

The commitizen command line utility, without nodejs.
MIT License
243 stars 25 forks source link

Backspace can't get to previous line #13

Open skaurus opened 2 years ago

skaurus commented 2 years ago

So, if I write a commit message that is long enough to span to new line; and then I try to delete some part of it with backspace - then cursor can't go further that the beginning of the second line. After it got there, no matter how many times I try to backspace, it stays there. First line visually stays the same. But actually, if I proceed and create the commit, it will turn out that symbols on the first line were deleted as I was pressing backspace. It is just not shown in any way.

lintingzhen commented 2 years ago

Thanks for the feedback, I will study how to solve it.

lintingzhen commented 2 years ago

I found that if the console width is adjusted when entering the commit message, it will trigger a bug that the text cannot be deleted after wrapping. If the console width is not adjusted, there is no such problem. The reason for this bug is that the program cannot control the text layout of the console in sufficient detail, at least I haven't found a way yet. So try not to adjust the console width when you need to enter the commit message, sorry.

skaurus commented 2 years ago

Hmmm, I use the Warp console (it's cool, by the way), and there it reproduces without resizing. Also I just tried it in iTerm2, and issue still persists.

skaurus commented 2 years ago

I wonder if OS make any difference. It does not replicate on Linux, while I'm using git mostly on a MacOS.

P.S. in both cases I'm in Warp, but it can be local or remote (ssh ...) session. Also, since MacOS use zsh and my Linux uses bash, I tried bash on MacOS - same issue.