mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
Use buffer number to name the options/recipients buffers
Since buffer numbers are unique in Vim, there's no concern about collisions between options/recipients buffers for different encrypted buffers. This also resolves an issue where opening the options buffer would trigger the recipients buffer (due to the buffer name matching g:GPGFilePattern. Closes jamessan/vim-gnupg#89 Signed-off-by: James McCoy <jamessan@jamessan.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
" Name: gnupg.vim
|
" Name: gnupg.vim
|
||||||
" Last Change: 2018 Jan 23
|
" Last Change: 2018 Jun 22
|
||||||
" Maintainer: James McCoy <jamessan@jamessan.com>
|
" Maintainer: James McCoy <jamessan@jamessan.com>
|
||||||
" Original Author: Markus Braun <markus.braun@krawel.de>
|
" Original Author: Markus Braun <markus.braun@krawel.de>
|
||||||
" Summary: Vim plugin for transparent editing of gpg encrypted files.
|
" Summary: Vim plugin for transparent editing of gpg encrypted files.
|
||||||
@@ -843,7 +843,7 @@ function s:GPGEditRecipients()
|
|||||||
if (!exists('b:GPGCorrespondingTo'))
|
if (!exists('b:GPGCorrespondingTo'))
|
||||||
|
|
||||||
" save buffer name
|
" save buffer name
|
||||||
let buffername = bufname("%")
|
let buffername = bufnr("%")
|
||||||
let editbuffername = "GPGRecipients_" . buffername
|
let editbuffername = "GPGRecipients_" . buffername
|
||||||
|
|
||||||
" check if this buffer exists
|
" check if this buffer exists
|
||||||
@@ -1058,7 +1058,7 @@ function s:GPGEditOptions()
|
|||||||
if (!exists('b:GPGCorrespondingTo'))
|
if (!exists('b:GPGCorrespondingTo'))
|
||||||
|
|
||||||
" save buffer name
|
" save buffer name
|
||||||
let buffername = bufname("%")
|
let buffername = bufnr("%")
|
||||||
let editbuffername = "GPGOptions_" . buffername
|
let editbuffername = "GPGOptions_" . buffername
|
||||||
|
|
||||||
" check if this buffer exists
|
" check if this buffer exists
|
||||||
|
|||||||
Reference in New Issue
Block a user