Skip to content

Commit 5935496

Browse files
authored
Merge pull request #72 from jesseduffield/fix-adding-blank-line-at-end-of-editable-views
Only avoid the blank line at end of view if view is not editable
2 parents 82d5184 + cbcfd44 commit 5935496

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

view.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ func (v *View) writeRunes(p []rune) {
787787
}
788788

789789
until := len(p)
790-
if until > 0 && p[until-1] == '\n' {
790+
if !v.Editable && until > 0 && p[until-1] == '\n' {
791791
v.pendingNewline = true
792792
until--
793793
}

0 commit comments

Comments
 (0)