Merge #7984 'defaults: sidescroll=1'

This commit is contained in:
Justin M. Keyes 2018-02-09 11:46:13 +01:00 committed by GitHub
commit a6052c7307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 17 additions and 24 deletions

View File

@ -5445,14 +5445,13 @@ A jump table for the options with a short description can be found at |Q_op|.
See |tab-page| for more information about tab pages. See |tab-page| for more information about tab pages.
*'sidescroll'* *'ss'* *'sidescroll'* *'ss'*
'sidescroll' 'ss' number (default 0) 'sidescroll' 'ss' number (default 1)
global global
The minimal number of columns to scroll horizontally. Used only when The minimal number of columns to scroll horizontally. Used only when
the 'wrap' option is off and the cursor is moved off of the screen. the 'wrap' option is off and the cursor is moved off of the screen.
When it is zero the cursor will be put in the middle of the screen. When it is zero the cursor will be put in the middle of the screen.
When using a slow terminal set it to a large number or 0. When using When using a slow terminal set it to a large number or 0. Not used
a fast terminal use a small number or 1. Not used for "zh" and "zl" for "zh" and "zl" commands.
commands.
*'sidescrolloff'* *'siso'* *'sidescrolloff'* *'siso'*
'sidescrolloff' 'siso' number (default 0) 'sidescrolloff' 'siso' number (default 0)

View File

@ -232,11 +232,6 @@ correct values. See |:mode|.
Slow and fast terminals *slow-fast-terminal* Slow and fast terminals *slow-fast-terminal*
*slow-terminal* *slow-terminal*
If you have a fast terminal you may like to set the 'ruler' option. The
cursor position is shown in the status line. If you are using horizontal
scrolling ('wrap' option off) consider setting 'sidescroll' to a small
number.
If you have a slow terminal you may want to reset the 'showcmd' and 'ruler' If you have a slow terminal you may want to reset the 'showcmd' and 'ruler'
options. The command characters and cursor positions will not be shown in the options. The command characters and cursor positions will not be shown in the
status line (which involves a lot of cursor motions and attribute changes for status line (which involves a lot of cursor motions and attribute changes for

View File

@ -48,6 +48,7 @@ a complete and centralized reference of those differences.
- 'ruler' is set by default - 'ruler' is set by default
- 'sessionoptions' doesn't include "options" - 'sessionoptions' doesn't include "options"
- 'showcmd' is set by default - 'showcmd' is set by default
- 'sidescroll' defaults to 1
- 'smarttab' is set by default - 'smarttab' is set by default
- 'tabpagemax' defaults to 50 - 'tabpagemax' defaults to 50
- 'tags' defaults to "./tags;,tags" - 'tags' defaults to "./tags;,tags"

View File

@ -2185,7 +2185,7 @@ return {
type='number', scope={'global'}, type='number', scope={'global'},
vi_def=true, vi_def=true,
varname='p_ss', varname='p_ss',
defaults={if_true={vi=0}} defaults={if_true={vi=1}}
}, },
{ {
full_name='sidescrolloff', abbreviation='siso', full_name='sidescrolloff', abbreviation='siso',

View File

@ -62,20 +62,9 @@ lang mess C
" Always use forward slashes. " Always use forward slashes.
set shellslash set shellslash
" Make sure $HOME does not get read or written.
let $HOME = '/does/not/exist'
" Prepare for calling garbagecollect_for_testing(). " Prepare for calling garbagecollect_for_testing().
let v:testing = 1 let v:testing = 1
" Align Nvim defaults to Vim.
set directory^=.
set backspace=
set nohidden smarttab noautoindent noautoread complete-=i noruler noshowcmd
set listchars=eol:$
" Prevent Nvim log from writing to stderr.
let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log'
func RunTheTest(test) func RunTheTest(test)
echo 'Executing ' . a:test echo 'Executing ' . a:test
if exists("*SetUp") if exists("*SetUp")

View File

@ -1,8 +1,14 @@
" Common preparations for running tests. " Common preparations for running tests.
set noruler " Align Nvim defaults to Vim.
set noshowcmd set sidescroll=0
set belloff= set directory^=.
set backspace=
set nohidden smarttab noautoindent noautoread complete-=i noruler noshowcmd
set listchars=eol:$
" Prevent Nvim log from writing to stderr.
let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log'
" Make sure 'runtimepath' and 'packpath' does not include $HOME. " Make sure 'runtimepath' and 'packpath' does not include $HOME.
set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after

View File

@ -905,6 +905,7 @@ describe("'winhighlight' highlight", function()
end) end)
it('background applies also to non-text', function() it('background applies also to non-text', function()
command('set sidescroll=0')
insert('Lorem ipsum dolor sit amet ') insert('Lorem ipsum dolor sit amet ')
command('set shiftwidth=2') command('set shiftwidth=2')
feed('>>') feed('>>')

View File

@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen')
local clear, feed, meths = helpers.clear, helpers.feed, helpers.meths local clear, feed, meths = helpers.clear, helpers.feed, helpers.meths
local insert, feed_command = helpers.insert, helpers.feed_command local insert, feed_command = helpers.insert, helpers.feed_command
local eq, funcs = helpers.eq, helpers.funcs local eq, funcs = helpers.eq, helpers.funcs
local command = helpers.command
describe('ui/mouse/input', function() describe('ui/mouse/input', function()
local screen local screen
@ -706,6 +707,7 @@ describe('ui/mouse/input', function()
end) end)
it('horizontal scrolling', function() it('horizontal scrolling', function()
command('set sidescroll=0')
feed("<esc>:set nowrap<cr>") feed("<esc>:set nowrap<cr>")
feed("a <esc>20Ab<esc>") feed("a <esc>20Ab<esc>")