Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: deprecate backup register #242

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ require("gitlab").setup({
pipeline = nil,
reply = nil,
squash_message = nil,
backup_register = nil,
},
discussion_tree = { -- The discussion tree that holds all comments
auto_open = true, -- Automatically open when the reviewer is opened
Expand Down
17 changes: 0 additions & 17 deletions doc/gitlab.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ you call this function with no values the defaults will be used:
pipeline = nil,
reply = nil,
squash_message = nil,
backup_register = nil,
},
discussion_tree = { -- The discussion tree that holds all comments
auto_open = true, -- Automatically open when the reviewer is opened
Expand Down Expand Up @@ -305,22 +304,6 @@ code block with prefilled code from the visual selection.
Just like the summary, all the different kinds of comments are saved via the
`settings.popup.perform_action` keybinding.

BACKUP REGISTER *gitlab.nvim.backup-register*

Sometimes, the action triggered by `settings.popup.perform_action` can fail.
To prevent losing your carefully crafted note/comment/suggestion you can set
`settings.popup.backup_register` to a writable register (see |registers|) to
which the contents of the popup window will be saved just before the action is
performed. A practical setting is `settings.popup.backup_register = "+"` which
saves to the system clipboard (see |quoteplus|). This lets you easily apply
the action on Gitlab in a browser, if it keeps failing in `gitlab.nvim`.

If you experience such problems, please first read the
|gitlab.nvim.troubleshooting| section. If it does not help, see if there are
any relevant known <https://github.com/harrisoncramer/gitlab.nvim/issues>. If
there are none, please open one and provide any error messages that
`gitlab.nvim` may be showing.

DISCUSSIONS AND NOTES *gitlab.nvim.discussions-and-notes*

Gitlab groups threads of comments together into "discussions."
Expand Down
4 changes: 0 additions & 4 deletions lua/gitlab/state.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ M.settings = {
help = nil,
pipeline = nil,
squash_message = nil,
backup_register = nil,
},
discussion_tree = {
auto_open = true,
Expand Down Expand Up @@ -283,9 +282,6 @@ M.set_popup_keymaps = function(popup, action, linewise_action, opts)
if action ~= nil then
vim.keymap.set("n", M.settings.popup.perform_action, function()
local text = u.get_buffer_text(popup.bufnr)
if M.settings.popup.backup_register ~= nil then
vim.cmd("0,$yank " .. M.settings.popup.backup_register)
end
if opts.action_before_close then
action(text, popup.bufnr)
exit(popup, opts)
Expand Down
Loading