Skip to content

Commit 61291a3

Browse files
Removes backup register option (#242)
This MR deprecates the "backup" register which was a hot-fix used to deal with bugs upon comment and note creation
1 parent 8b4ccaf commit 61291a3

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ require("gitlab").setup({
127127
pipeline = nil,
128128
reply = nil,
129129
squash_message = nil,
130-
backup_register = nil,
131130
},
132131
discussion_tree = { -- The discussion tree that holds all comments
133132
auto_open = true, -- Automatically open when the reviewer is opened

doc/gitlab.nvim.txt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ you call this function with no values the defaults will be used:
158158
pipeline = nil,
159159
reply = nil,
160160
squash_message = nil,
161-
backup_register = nil,
162161
},
163162
discussion_tree = { -- The discussion tree that holds all comments
164163
auto_open = true, -- Automatically open when the reviewer is opened
@@ -304,22 +303,6 @@ code block with prefilled code from the visual selection.
304303
Just like the summary, all the different kinds of comments are saved via the
305304
`settings.popup.perform_action` keybinding.
306305

307-
BACKUP REGISTER *gitlab.nvim.backup-register*
308-
309-
Sometimes, the action triggered by `settings.popup.perform_action` can fail.
310-
To prevent losing your carefully crafted note/comment/suggestion you can set
311-
`settings.popup.backup_register` to a writable register (see |registers|) to
312-
which the contents of the popup window will be saved just before the action is
313-
performed. A practical setting is `settings.popup.backup_register = "+"` which
314-
saves to the system clipboard (see |quoteplus|). This lets you easily apply
315-
the action on Gitlab in a browser, if it keeps failing in `gitlab.nvim`.
316-
317-
If you experience such problems, please first read the
318-
|gitlab.nvim.troubleshooting| section. If it does not help, see if there are
319-
any relevant known <https://github.com/harrisoncramer/gitlab.nvim/issues>. If
320-
there are none, please open one and provide any error messages that
321-
`gitlab.nvim` may be showing.
322-
323306
DISCUSSIONS AND NOTES *gitlab.nvim.discussions-and-notes*
324307

325308
Gitlab groups threads of comments together into "discussions."

lua/gitlab/state.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ M.settings = {
3939
help = nil,
4040
pipeline = nil,
4141
squash_message = nil,
42-
backup_register = nil,
4342
},
4443
discussion_tree = {
4544
auto_open = true,
@@ -278,9 +277,6 @@ M.set_popup_keymaps = function(popup, action, linewise_action, opts)
278277
if action ~= nil then
279278
vim.keymap.set("n", M.settings.popup.perform_action, function()
280279
local text = u.get_buffer_text(popup.bufnr)
281-
if M.settings.popup.backup_register ~= nil then
282-
vim.cmd("0,$yank " .. M.settings.popup.backup_register)
283-
end
284280
if opts.action_before_close then
285281
action(text, popup.bufnr)
286282
exit(popup, opts)

0 commit comments

Comments
 (0)