Skip to content

Commit

Permalink
use "comment" over "comments" in review buffer (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
macovsky authored Oct 30, 2024
1 parent 84a4f19 commit 616fabd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/octo/reviews/file-entry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ function FileEntry:place_signs()

-- place the virtual text only on first line
local last_date = comment.lastEditedAt ~= vim.NIL and comment.lastEditedAt or comment.createdAt
local vt_msg = string.format(" %d comments (%s)", #thread.comments.nodes, utils.format_date(last_date))
local comments_count = #thread.comments.nodes
local comments_word = comments_count == 1 and "comment" or "comments"
local vt_msg = string.format(" %d %s (%s)", comments_count, comments_word, utils.format_date(last_date))
--vim.api.nvim_buf_set_virtual_text(split.bufnr, -1, startLine - 1, { { vt_msg, "Comment" } }, {})
local opts = {
virt_text = { { vt_msg, "Comment" } },
Expand Down

0 comments on commit 616fabd

Please sign in to comment.