mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
test: mouse_spec
- Use the default buffer text provided by before_each (avoids extra steps and makes the tests more consistent with each other) - Indent - Adjust help doc
This commit is contained in:
@@ -4399,9 +4399,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'mousetime'* *'mouset'*
|
||||
'mousetime' 'mouset' number (default 500)
|
||||
global
|
||||
Only for GUI, Windows and Unix with xterm. Defines the maximum
|
||||
time in msec between two mouse clicks for the second click to be
|
||||
recognized as a multi click.
|
||||
Defines the maximum time in msec between two mouse clicks for the
|
||||
second click to be recognized as a multi click.
|
||||
|
||||
*'nrformats'* *'nf'*
|
||||
'nrformats' 'nf' string (default "bin,hex")
|
||||
|
@@ -16,9 +16,9 @@ describe('Mouse input', function()
|
||||
clear()
|
||||
meths.set_option('mouse', 'a')
|
||||
meths.set_option('listchars', 'eol:$')
|
||||
-- set mouset to very high value to ensure that even in valgrind/travis,
|
||||
-- set mousetime to very high value to ensure that even in valgrind/travis,
|
||||
-- nvim will still pick multiple clicks
|
||||
meths.set_option('mouset', 5000)
|
||||
meths.set_option('mousetime', 5000)
|
||||
screen = Screen.new(25, 5)
|
||||
screen:attach()
|
||||
screen:set_default_attr_ids({
|
||||
@@ -65,24 +65,20 @@ describe('Mouse input', function()
|
||||
end)
|
||||
|
||||
it('double left click enters visual mode', function()
|
||||
execute('%delete')
|
||||
insert('foo')
|
||||
feed('<LeftMouse><0,0>')
|
||||
feed('<LeftRelease><0,0>')
|
||||
feed('<LeftMouse><0,0>')
|
||||
feed('<LeftRelease><0,0>')
|
||||
screen:expect([[
|
||||
{1:fo}^o |
|
||||
~ |
|
||||
~ |
|
||||
{1:testin}^g |
|
||||
mouse |
|
||||
support and selection |
|
||||
~ |
|
||||
{2:-- VISUAL --} |
|
||||
]])
|
||||
end)
|
||||
|
||||
it('triple left click enters visual line mode', function()
|
||||
execute('%delete')
|
||||
insert('foo')
|
||||
feed('<LeftMouse><0,0>')
|
||||
feed('<LeftRelease><0,0>')
|
||||
feed('<LeftMouse><0,0>')
|
||||
@@ -90,17 +86,15 @@ describe('Mouse input', function()
|
||||
feed('<LeftMouse><0,0>')
|
||||
feed('<LeftRelease><0,0>')
|
||||
screen:expect([[
|
||||
^f{1:oo}{3: } |
|
||||
~ |
|
||||
~ |
|
||||
^t{1:esting}{3: } |
|
||||
mouse |
|
||||
support and selection |
|
||||
~ |
|
||||
{2:-- VISUAL LINE --} |
|
||||
]])
|
||||
end)
|
||||
|
||||
it('quadruple left click enters visual block mode', function()
|
||||
execute('%delete')
|
||||
insert('foo')
|
||||
feed('<LeftMouse><0,0>')
|
||||
feed('<LeftRelease><0,0>')
|
||||
feed('<LeftMouse><0,0>')
|
||||
@@ -110,9 +104,9 @@ describe('Mouse input', function()
|
||||
feed('<LeftMouse><0,0>')
|
||||
feed('<LeftRelease><0,0>')
|
||||
screen:expect([[
|
||||
^foo |
|
||||
~ |
|
||||
~ |
|
||||
^testing |
|
||||
mouse |
|
||||
support and selection |
|
||||
~ |
|
||||
{2:-- VISUAL BLOCK --} |
|
||||
]])
|
||||
|
Reference in New Issue
Block a user