From 1702ce40cbcbfe53d9b57f3e9cde8ecfc441800a Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 9 Jun 2020 14:41:28 -0400 Subject: Prefer `view.call_tip_*` instead of `buffer.call_tip_*`. --- test/test.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'test/test.lua') diff --git a/test/test.lua b/test/test.lua index 650b092b..2874c415 100644 --- a/test/test.lua +++ b/test/test.lua @@ -1845,27 +1845,27 @@ function test_editing_show_documentation() } buffer:add_text('foo') textadept.editing.show_documentation() - assert(buffer:call_tip_active(), 'documentation not found') - buffer:call_tip_cancel() + assert(view:call_tip_active(), 'documentation not found') + view:call_tip_cancel() buffer:add_text('2') textadept.editing.show_documentation() - assert(buffer:call_tip_active(), 'documentation not found') - buffer:call_tip_cancel() + assert(view:call_tip_active(), 'documentation not found') + view:call_tip_cancel() buffer:add_text('bar') textadept.editing.show_documentation() - assert(not buffer:call_tip_active(), 'documentation found') + assert(not view:call_tip_active(), 'documentation found') buffer:clear_all() buffer:add_text('FOO') textadept.editing.show_documentation(nil, true) - assert(buffer:call_tip_active(), 'documentation not found') - buffer:call_tip_cancel() + assert(view:call_tip_active(), 'documentation not found') + view:call_tip_cancel() buffer:add_text('(') textadept.editing.show_documentation(nil, true) - assert(buffer:call_tip_active(), 'documentation not found') - buffer:call_tip_cancel() + assert(view:call_tip_active(), 'documentation not found') + view:call_tip_cancel() buffer:add_text('bar') textadept.editing.show_documentation(nil, true) - assert(buffer:call_tip_active(), 'documentation not found') + assert(view:call_tip_active(), 'documentation not found') events.emit(events.CALL_TIP_CLICK, 1) -- TODO: test calltip cycling. buffer:close(true) @@ -2282,8 +2282,8 @@ function test_menu_menu_functions() buffer:auto_c_cancel() buffer:char_left() textadept.menu.menubar[_L['Tools']][_L['Show Style']][2]() - assert(buffer:call_tip_active(), 'style not shown') - buffer:call_tip_cancel() + assert(view:call_tip_active(), 'style not shown') + view:call_tip_cancel() local use_tabs = buffer.use_tabs textadept.menu.menubar[_L['Buffer']][_L['Indentation']][_L['Toggle Use Tabs']][2]() assert(buffer.use_tabs ~= use_tabs, 'use tabs not toggled') -- cgit v1.2.3