Fix end of buffer character (#491)

This commit is contained in:
Michael Lorant
2024-02-29 10:29:45 -05:00
committed by GitHub
parent 6ebf50e419
commit 6c9e52a8fd
2 changed files with 17 additions and 20 deletions
+1 -4
View File
@@ -1138,10 +1138,7 @@ func (m Model) View() string {
s.WriteString(prompt)
displayLine++
if m.ShowLineNumbers {
lineNumber := m.style.EndOfBuffer.Render(string(m.EndOfBufferCharacter))
s.WriteString(lineNumber)
}
s.WriteString(m.style.EndOfBuffer.Render(string(m.EndOfBufferCharacter)))
s.WriteRune('\n')
}
+16 -16
View File
@@ -478,11 +478,11 @@ func TestView(t *testing.T) {
},
expected: heredoc.Doc(`
> the first line
>
>
>
>
>
> ~
> ~
> ~
> ~
> ~
`),
},
{
@@ -497,9 +497,9 @@ func TestView(t *testing.T) {
> the first line
> the second line
> the third line
>
>
>
> ~
> ~
> ~
`),
},
{
@@ -547,11 +547,11 @@ func TestView(t *testing.T) {
},
expected: heredoc.Doc(`
> the first line
>
>
>
>
>
> *
> *
> *
> *
> *
`),
},
{
@@ -567,9 +567,9 @@ func TestView(t *testing.T) {
> the first line
> the second line
> the third line
>
>
>
> *
> *
> *
`),
},
{