diff options
Diffstat (limited to 'test/functional/ui/screen.lua')
-rw-r--r-- | test/functional/ui/screen.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index e5a449fa66..f5ae9c8e89 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -803,14 +803,17 @@ function Screen:_handle_win_pos(grid, win, startrow, startcol, width, height) self.float_pos[grid] = nil end -function Screen:_handle_win_viewport(grid, win, topline, botline, curline, curcol, linecount) +function Screen:_handle_win_viewport(grid, win, topline, botline, curline, curcol, linecount, scroll_delta) + -- accumulate scroll delta + local last_scroll_delta = self.win_viewport[grid] and self.win_viewport[grid].sum_scroll_delta or 0 self.win_viewport[grid] = { win = win, topline = topline, botline = botline, curline = curline, curcol = curcol, - linecount = linecount + linecount = linecount, + sum_scroll_delta = scroll_delta + last_scroll_delta } end @@ -1348,7 +1351,7 @@ local function fmt_ext_state(name, state) for k,v in pairs(state) do str = (str.." ["..k.."] = {win = {id = "..v.win.id.."}, topline = " ..v.topline..", botline = "..v.botline..", curline = "..v.curline - ..", curcol = "..v.curcol..", linecount = "..v.linecount.."};\n") + ..", curcol = "..v.curcol..", linecount = "..v.linecount..", scroll_delta = "..v.scroll_delta.."};\n") end return str .. "}" elseif name == "float_pos" then |