From d30a9622a500f6d538852fe92953e6615e1dd711 Mon Sep 17 00:00:00 2001 From: George Sokianos Date: Wed, 5 Jan 2022 20:03:20 +0000 Subject: [PATCH] Added config.scroll_past_end --- README_OS4.md | 14 ++++++++------ data/core/config.lua | 1 + data/core/docview.lua | 5 ++++- os4build.sh | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) mode change 100755 => 100644 data/core/config.lua mode change 100755 => 100644 data/core/docview.lua mode change 100755 => 100644 os4build.sh diff --git a/README_OS4.md b/README_OS4.md index 6982c0f3..740de43d 100644 --- a/README_OS4.md +++ b/README_OS4.md @@ -1,12 +1,9 @@ # Lite XL for AmigaOS 4.1 FE -Lite XL is coming to AmigaOS 4.1. This is a preview release for my supporters -and not ready for public release, so please do not share it yet. +Lite XL is coming to AmigaOS 4.1. -A lot of things are not quite working. Please have a look at the todo list -below, for known bugs and things I want to add. - -If you would like to give me some feedback, contact me at walkero@gmail.com +A few things are not quite working. Please have a look at the "Known issues" +section below. ## Installation You can extract the Lite XL archive wherever you want and run the *lite* @@ -39,6 +36,11 @@ https://git.walkero.gr/walkero/lite-xl/issues # Changelog +## [1.16.12.7] - future +## Added +- Added config.scroll_past_end that when its true lets the user scroll + further than the end of the file. By default is set to false. + ## [1.16.12.6] - 2022-01-04 ### Fixed - Fixed a problem introduced in previous version when LiteXL was executed diff --git a/data/core/config.lua b/data/core/config.lua old mode 100755 new mode 100644 index 36a67add..0ed564a7 --- a/data/core/config.lua +++ b/data/core/config.lua @@ -6,6 +6,7 @@ config.max_log_items = 80 config.message_timeout = 5 config.mouse_wheel_scroll = 50 * SCALE config.file_size_limit = 10 +config.scroll_past_end = true config.ignore_files = "^%." config.symbol_pattern = "[%a_][%w_]*" config.non_word_chars = " \t\n/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-" diff --git a/data/core/docview.lua b/data/core/docview.lua old mode 100755 new mode 100644 index 070ee0c4..2375a499 --- a/data/core/docview.lua +++ b/data/core/docview.lua @@ -96,7 +96,10 @@ function DocView:get_filename() end -function DocView:get_scrollable_size() +function DocView:get_scrollable_size() + if not config.scroll_past_end then + return self:get_line_height() * (#self.doc.lines) + style.padding.y * 2 + end return self:get_line_height() * (#self.doc.lines - 1) + self.size.y end diff --git a/os4build.sh b/os4build.sh old mode 100755 new mode 100644 index e3765653..1d49a4df --- a/os4build.sh +++ b/os4build.sh @@ -1,6 +1,6 @@ #!/bin/bash -cflags="-D__USE_INLINE__ -DLITE_XL_DATA_USE_EXEDIR -DLITE_USE_SDL_RENDERER -Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc -Ilib/font_renderer -I/sdk/local/newlib/include/SDL2 -lSDL2 -llua -lauto" +cflags="-D__USE_INLINE__ -DLITE_XL_DATA_USE_EXEDIR -DLITE_USE_SDL_RENDERER -Wall -O3 -std=gnu11 -fno-strict-aliasing -Isrc -Ilib/font_renderer -I/sdk/local/newlib/include/SDL2 -lSDL2 -llua -lauto" #cflags+=" $(pkg-config --cflags lua5.2) $(sdl2-config --cflags)" lflags="-mcrt=newlib -static-libgcc -static-libstdc++ -lSDL2 -lagg -lfreetype -llua -lm -lpthread -athread=native" #for package in libagg freetype2 lua5.2; do