feat(options)!: deprecate paste, remove pastetoggle (#22647)

we cannot remove 'paste'. It is very common in plugins and configs.

'pastetoggle' can and should be removed though, it's a total waste of everyone's time because it generates bug reports and doesn't work well, and is useless because bracketed-paste works better.
This commit is contained in:
ii14
2023-03-13 03:29:11 +01:00
committed by GitHub
parent 673d2b52fa
commit 2daf0b37db
18 changed files with 37 additions and 325 deletions

View File

@@ -1,21 +1,4 @@
" Test for 'pastetoggle'
func Test_pastetoggle()
new
set pastetoggle=<F4>
set nopaste
call feedkeys("iHello\<F4>", 'xt')
call assert_true(&paste)
call feedkeys("i\<F4>", 'xt')
call assert_false(&paste)
call assert_equal('Hello', getline(1))
" command-line completion for 'pastetoggle' value
call feedkeys(":set pastetoggle=\<Tab>\<C-B>\"\<CR>", 'xt')
call assert_equal('"set pastetoggle=<F4>', @:)
set pastetoggle&
bwipe!
endfunc
" Test for restoring option values when 'paste' is disabled
func Test_paste_opt_restore()
set autoindent expandtab ruler showmatch