aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/file_types.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2020-05-25 21:16:01 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2020-05-25 21:16:01 -0400
commitf2374c4aba53fa462dc88d4104e10d8cb97e61ba (patch)
tree5e5a9d26a5ad8915c0e12187dd059b1109fcf22d /modules/textadept/file_types.lua
parenteffc636745e8d9c680c3acf42e8e25eed10cd903 (diff)
downloadtextadept-f2374c4aba53fa462dc88d4104e10d8cb97e61ba.tar.gz
textadept-f2374c4aba53fa462dc88d4104e10d8cb97e61ba.zip
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.
Diffstat (limited to 'modules/textadept/file_types.lua')
-rw-r--r--modules/textadept/file_types.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/file_types.lua b/modules/textadept/file_types.lua
index 2889734c..34ae1dae 100644
--- a/modules/textadept/file_types.lua
+++ b/modules/textadept/file_types.lua
@@ -70,7 +70,7 @@ local function set_lexer(buffer, lang)
buffer._lexer = lang
if package.searchpath(lang, package.path) then _M[lang] = require(lang) end
if buffer ~= ui.command_entry then events.emit(events.LEXER_LOADED, lang) end
- local last_line = buffer.first_visible_line + buffer.lines_on_screen
+ local last_line = view.first_visible_line + view.lines_on_screen
buffer:colourise(1, buffer:position_from_line(last_line + 1)) -- refresh
end