aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-02-09 11:46:13 +0100
committerGitHub <noreply@github.com>2018-02-09 11:46:13 +0100
commita6052c7307414045fbe2f55cd0c6a5017eb9f68e (patch)
tree1416000d6727c12a2df0f10236a09598ac6b312c
parentdc536295875640ef5d7b28d8135d0ef72d782d5e (diff)
parent7229493eb171138b850404d486ccbe2943d0c497 (diff)
downloadrneovim-a6052c7307414045fbe2f55cd0c6a5017eb9f68e.tar.gz
rneovim-a6052c7307414045fbe2f55cd0c6a5017eb9f68e.tar.bz2
rneovim-a6052c7307414045fbe2f55cd0c6a5017eb9f68e.zip
Merge #7984 'defaults: sidescroll=1'
-rw-r--r--runtime/doc/options.txt7
-rw-r--r--runtime/doc/term.txt5
-rw-r--r--runtime/doc/vim_diff.txt1
-rw-r--r--src/nvim/options.lua2
-rw-r--r--src/nvim/testdir/runtest.vim11
-rw-r--r--src/nvim/testdir/setup.vim12
-rw-r--r--test/functional/ui/highlight_spec.lua1
-rw-r--r--test/functional/ui/mouse_spec.lua2
8 files changed, 17 insertions, 24 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 6a36202177..a1a361fc85 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -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.
*'sidescroll'* *'ss'*
-'sidescroll' 'ss' number (default 0)
+'sidescroll' 'ss' number (default 1)
global
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.
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
- a fast terminal use a small number or 1. Not used for "zh" and "zl"
- commands.
+ When using a slow terminal set it to a large number or 0. Not used
+ for "zh" and "zl" commands.
*'sidescrolloff'* *'siso'*
'sidescrolloff' 'siso' number (default 0)
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index 6cf62f9bb5..075ffdac52 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -232,11 +232,6 @@ correct values. See |:mode|.
Slow and fast terminals *slow-fast-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'
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
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index c5c558279e..d61c4d0c06 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -48,6 +48,7 @@ a complete and centralized reference of those differences.
- 'ruler' is set by default
- 'sessionoptions' doesn't include "options"
- 'showcmd' is set by default
+- 'sidescroll' defaults to 1
- 'smarttab' is set by default
- 'tabpagemax' defaults to 50
- 'tags' defaults to "./tags;,tags"
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index db7ed9da45..dac5c0ee16 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -2185,7 +2185,7 @@ return {
type='number', scope={'global'},
vi_def=true,
varname='p_ss',
- defaults={if_true={vi=0}}
+ defaults={if_true={vi=1}}
},
{
full_name='sidescrolloff', abbreviation='siso',
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim
index 4de1345679..01ba8baf02 100644
--- a/src/nvim/testdir/runtest.vim
+++ b/src/nvim/testdir/runtest.vim
@@ -62,20 +62,9 @@ lang mess C
" Always use forward slashes.
set shellslash
-" Make sure $HOME does not get read or written.
-let $HOME = '/does/not/exist'
-
" Prepare for calling garbagecollect_for_testing().
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)
echo 'Executing ' . a:test
if exists("*SetUp")
diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim
index 06f2199214..87cf1f6163 100644
--- a/src/nvim/testdir/setup.vim
+++ b/src/nvim/testdir/setup.vim
@@ -1,8 +1,14 @@
" Common preparations for running tests.
-set noruler
-set noshowcmd
-set belloff=
+" Align Nvim defaults to Vim.
+set sidescroll=0
+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.
set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index 2252e3580f..95fb2ce21c 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -905,6 +905,7 @@ describe("'winhighlight' highlight", function()
end)
it('background applies also to non-text', function()
+ command('set sidescroll=0')
insert('Lorem ipsum dolor sit amet ')
command('set shiftwidth=2')
feed('>>')
diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua
index 13820af3b8..e5708d51ef 100644
--- a/test/functional/ui/mouse_spec.lua
+++ b/test/functional/ui/mouse_spec.lua
@@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen')
local clear, feed, meths = helpers.clear, helpers.feed, helpers.meths
local insert, feed_command = helpers.insert, helpers.feed_command
local eq, funcs = helpers.eq, helpers.funcs
+local command = helpers.command
describe('ui/mouse/input', function()
local screen
@@ -706,6 +707,7 @@ describe('ui/mouse/input', function()
end)
it('horizontal scrolling', function()
+ command('set sidescroll=0')
feed("<esc>:set nowrap<cr>")
feed("a <esc>20Ab<esc>")