Skip to content

fix(previewer): remove unexpected trailing blank line#3653

Merged
Conni2461 merged 1 commit into
nvim-telescope:masterfrom
Thaumy:master
Apr 22, 2026
Merged

fix(previewer): remove unexpected trailing blank line#3653
Conni2461 merged 1 commit into
nvim-telescope:masterfrom
Thaumy:master

Conversation

@Thaumy
Copy link
Copy Markdown
Contributor

@Thaumy Thaumy commented Apr 21, 2026

Description

There will be a blank line in the previewer buffer if the file ends with
a line feed. Since Neovim treats \n (or \r\n) as the
"line terminator" instead of the "line separator", the previewer buffer
should be consistent with the standard behavior.

This removes the last empty string from the split result to fix that.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

There will be a blank line in the previewer buffer if the file ends with
a line feed. Since Neovim treats `\n` (or `\r\n`) as the
"line terminator" instead of the "line separator", the previewer buffer
should be consistent with the standard behavior.

This removes the last empty string from the split result to fix that.
@Conni2461
Copy link
Copy Markdown
Member

thanks

@Conni2461 Conni2461 merged commit 5063384 into nvim-telescope:master Apr 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants