mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
Delete all output from "tty" command
Instead of assuming a single line is output, which may be wrong in error conditions, use the '[/'] marks to delete everything that was read. Closes jamessan/vim-gnupg#106 Signed-off-by: James McCoy <jamessan@jamessan.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
" Name: autoload/gnupg.vim
|
" Name: autoload/gnupg.vim
|
||||||
" Last Change: 2019 Feb 11
|
" Last Change: 2019 Aug 23
|
||||||
" 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.
|
||||||
@@ -217,7 +217,7 @@ function gnupg#init(bufread)
|
|||||||
set undolevels=-1
|
set undolevels=-1
|
||||||
silent read !tty
|
silent read !tty
|
||||||
let $GPG_TTY = getline('.')
|
let $GPG_TTY = getline('.')
|
||||||
silent delete
|
silent '[,']delete _
|
||||||
let [&l:modified, &undolevels] = [mod, levels]
|
let [&l:modified, &undolevels] = [mod, levels]
|
||||||
" redraw is needed since we're using silent to run !tty, c.f. :help :!
|
" redraw is needed since we're using silent to run !tty, c.f. :help :!
|
||||||
redraw!
|
redraw!
|
||||||
|
|||||||
Reference in New Issue
Block a user