mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
vim-patch:9.1.0899: default for 'backspace' can be set in C code (#31416)
Problem: default for 'backspace' can be set in C code
Solution: promote the default for 'backspace' from defaults.vim to the C
code (Luca Saccarola)
closes: vim/vim#16143
959ef61430
N/A patches:
vim-patch:9.1.0895: default history value is too small
vim-patch:075aeea: runtime(doc): document changed default value for 'history'
Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
This commit is contained in:
parent
feb62d5429
commit
fb689d7ebd
@ -39,7 +39,6 @@ Defaults *nvim-defaults*
|
|||||||
- 'autoindent' is enabled
|
- 'autoindent' is enabled
|
||||||
- 'autoread' is enabled (works in all UIs, including terminal)
|
- 'autoread' is enabled (works in all UIs, including terminal)
|
||||||
- 'background' defaults to "dark" (unless set automatically by the terminal/UI)
|
- 'background' defaults to "dark" (unless set automatically by the terminal/UI)
|
||||||
- 'backspace' defaults to "indent,eol,start"
|
|
||||||
- 'backupdir' defaults to .,~/.local/state/nvim/backup// (|xdg|), auto-created
|
- 'backupdir' defaults to .,~/.local/state/nvim/backup// (|xdg|), auto-created
|
||||||
- 'belloff' defaults to "all"
|
- 'belloff' defaults to "all"
|
||||||
- 'comments' includes "fb:•"
|
- 'comments' includes "fb:•"
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
if exists('s:did_load')
|
if exists('s:did_load')
|
||||||
" Align Nvim defaults to Vim.
|
" Align Nvim defaults to Vim.
|
||||||
set backspace=
|
|
||||||
set commentstring=/*\ %s\ */
|
set commentstring=/*\ %s\ */
|
||||||
set complete=.,w,b,u,t,i
|
set complete=.,w,b,u,t,i
|
||||||
set define=^\\s*#\\s*define
|
set define=^\\s*#\\s*define
|
||||||
|
@ -1198,8 +1198,8 @@ func Test_OptionSet()
|
|||||||
call assert_equal(g:opt[0], g:opt[1])
|
call assert_equal(g:opt[0], g:opt[1])
|
||||||
|
|
||||||
" 14: Setting option backspace through :let"
|
" 14: Setting option backspace through :let"
|
||||||
let g:options = [['backspace', '', '', '', 'eol,indent,start', 'global', 'set']]
|
let g:options = [['backspace', 'indent,eol,start', 'indent,eol,start', 'indent,eol,start', '', 'global', 'set']]
|
||||||
let &bs = "eol,indent,start"
|
let &bs = ''
|
||||||
call assert_equal([], g:options)
|
call assert_equal([], g:options)
|
||||||
call assert_equal(g:opt[0], g:opt[1])
|
call assert_equal(g:opt[0], g:opt[1])
|
||||||
|
|
||||||
|
@ -250,9 +250,12 @@ func Test_digraphs_option()
|
|||||||
call Put_Dig_BS("P","=")
|
call Put_Dig_BS("P","=")
|
||||||
call assert_equal(['Р']+repeat(["₽"],2)+['П'], getline(line('.')-3,line('.')))
|
call assert_equal(['Р']+repeat(["₽"],2)+['П'], getline(line('.')-3,line('.')))
|
||||||
" Not a digraph: this is different from <c-k>!
|
" Not a digraph: this is different from <c-k>!
|
||||||
|
let _bs = &bs
|
||||||
|
set bs=
|
||||||
call Put_Dig_BS("a","\<bs>")
|
call Put_Dig_BS("a","\<bs>")
|
||||||
call Put_Dig_BS("\<bs>","a")
|
call Put_Dig_BS("\<bs>","a")
|
||||||
call assert_equal(['','a'], getline(line('.')-1,line('.')))
|
call assert_equal(['','a'], getline(line('.')-1,line('.')))
|
||||||
|
let &bs = _bs
|
||||||
" Grave
|
" Grave
|
||||||
call Put_Dig_BS("a","!")
|
call Put_Dig_BS("a","!")
|
||||||
call Put_Dig_BS("!","e")
|
call Put_Dig_BS("!","e")
|
||||||
|
@ -1509,7 +1509,7 @@ func Test_complete_item_refresh_always()
|
|||||||
set completefunc=Tcomplete
|
set completefunc=Tcomplete
|
||||||
exe "normal! iup\<C-X>\<C-U>\<BS>\<BS>\<BS>\<BS>\<BS>"
|
exe "normal! iup\<C-X>\<C-U>\<BS>\<BS>\<BS>\<BS>\<BS>"
|
||||||
call assert_equal('up', getline(1))
|
call assert_equal('up', getline(1))
|
||||||
call assert_equal(2, g:CallCount)
|
call assert_equal(6, g:CallCount)
|
||||||
set completeopt&
|
set completeopt&
|
||||||
set completefunc&
|
set completefunc&
|
||||||
bw!
|
bw!
|
||||||
|
@ -496,7 +496,7 @@ func Test_set_completion_string_values()
|
|||||||
" but don't exhaustively validate their results.
|
" but don't exhaustively validate their results.
|
||||||
call assert_equal('single', getcompletion('set ambw=', 'cmdline')[0])
|
call assert_equal('single', getcompletion('set ambw=', 'cmdline')[0])
|
||||||
call assert_match('light\|dark', getcompletion('set bg=', 'cmdline')[1])
|
call assert_match('light\|dark', getcompletion('set bg=', 'cmdline')[1])
|
||||||
call assert_equal('indent', getcompletion('set backspace=', 'cmdline')[0])
|
call assert_equal('indent,eol,start', getcompletion('set backspace=', 'cmdline')[0])
|
||||||
call assert_equal('yes', getcompletion('set backupcopy=', 'cmdline')[1])
|
call assert_equal('yes', getcompletion('set backupcopy=', 'cmdline')[1])
|
||||||
call assert_equal('backspace', getcompletion('set belloff=', 'cmdline')[1])
|
call assert_equal('backspace', getcompletion('set belloff=', 'cmdline')[1])
|
||||||
call assert_equal('min:', getcompletion('set briopt=', 'cmdline')[1])
|
call assert_equal('min:', getcompletion('set briopt=', 'cmdline')[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user