Skip to content

Commit

Permalink
Remove nobackup option (#86)
Browse files Browse the repository at this point in the history
Close #85

The `backup` (and `nobackup`) option is global and not local to the
buffer so this change affects all buffers. This is not the intended.

Note that it seems the `backup` option does not have any effect while
suda write the file through `BufWriteCmd`. So this simple change should
not affect the security of the plugin.
  • Loading branch information
lambdalisue authored Dec 6, 2024
1 parent b97fab5 commit e333169
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/suda.vim
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function! suda#BufReadCmd() abort
\})
silent 0delete _
setlocal buftype=acwrite
setlocal nobackup noswapfile noundofile
setlocal noswapfile noundofile
setlocal nomodified
filetype detect
redraw | echo echo_message
Expand Down

0 comments on commit e333169

Please sign in to comment.