From f2374c4aba53fa462dc88d4104e10d8cb97e61ba Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 25 May 2020 21:16:01 -0400 Subject: Allow views to be used as buffers and update API. This allows for a superficial separation of buffer- and view-specific Scintilla functionality. buffers and views can now be used interchangeably for the most part, and the APIs are guidance, not hard requirements. User scripts do not require any modification and will continue to function normally. --- modules/textadept/keys.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/textadept/keys.lua') diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index a72899ca..212f85ea 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -486,8 +486,8 @@ if GUI then keys[not OSX and 'caI' or 'cI'] = m_view[_L['Toggle Show Indent Guides']][2] keys[not OSX and 'caV' or 'cV'] = m_view[_L['Toggle Virtual Space']][2] end -keys[not OSX and GUI and 'c=' or 'm='] = buffer.zoom_in -keys[not OSX and GUI and 'c-' or 'm-'] = buffer.zoom_out +keys[not OSX and GUI and 'c=' or 'm='] = view.zoom_in +keys[not OSX and GUI and 'c-' or 'm-'] = view.zoom_out keys[not OSX and GUI and 'c0' or 'm0'] = m_view[_L['Reset Zoom']][2] -- Help. @@ -512,7 +512,7 @@ if OSX then buffer:line_end_extend() if not buffer.selection_empty then buffer:cut() else buffer:clear() end end - keys.cl = buffer.vertical_centre_caret + keys.cl = view.vertical_centre_caret -- GTK-OSX reports Fn-key as a single keycode which confuses Scintilla. Do -- not propagate it. keys.fn = function() return true end -- cgit v1.2.3