mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Only avoid the blank line at end of view if view is not editable
For editable views it is important to actually show the blank line so that we can put the cursor there for typing. This fixes problems with adding blank lines at the end of longer commit messages.
This commit is contained in:
@ -323,6 +323,6 @@ func (s *State) CalculateOrigin(currentOrigin int, bufferHeight int, numLines in
|
||||
|
||||
func wrapPatchLines(diff string, view *gocui.View) ([]int, []int) {
|
||||
_, viewLineIndices, patchLineIndices := utils.WrapViewLinesToWidth(
|
||||
view.Wrap, strings.TrimSuffix(diff, "\n"), view.InnerWidth())
|
||||
view.Wrap, view.Editable, strings.TrimSuffix(diff, "\n"), view.InnerWidth())
|
||||
return viewLineIndices, patchLineIndices
|
||||
}
|
||||
|
Reference in New Issue
Block a user