From 288819c9cc8620fdb749721618bd43c479a9e500 Mon Sep 17 00:00:00 2001 From: Famiu Haque Date: Wed, 18 May 2022 21:15:34 +0600 Subject: fix(ui): set correct position on mouse click when 'winbar' is enabled --- test/functional/ui/winbar_spec.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test') diff --git a/test/functional/ui/winbar_spec.lua b/test/functional/ui/winbar_spec.lua index 6cf587d47b..abc6088801 100644 --- a/test/functional/ui/winbar_spec.lua +++ b/test/functional/ui/winbar_spec.lua @@ -2,6 +2,9 @@ local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local clear = helpers.clear local command = helpers.command +local insert = helpers.insert +local meths = helpers.meths +local eq = helpers.eq describe('winbar', function() local screen @@ -177,4 +180,18 @@ describe('winbar', function() | ]]) end) + it('sets correct position on mouse click', function() + insert[[ + line 1 + line 2 + line 3 + line 4 + line -42 + line i + line sin(theta) + line 8 + ]] + meths.input_mouse('left', 'press', '', 0, 5, 1) + eq({5, 1}, meths.win_get_cursor(0)) + end) end) -- cgit