bugfix: avoid scrolling on 'end'

[?]
Jul 5, 2022, 6:24 PM
YJJ4X4JGABMVA5JBQW5UAWI543P3Y7NDVFTOHA6LIDA5KSFGUFNQC

Dependencies

  • [2] VC2CU2GG faster paste
  • [3] HTWAM4NZ bugfix: scrolling in left/right movements
  • [4] WOXIYUTL bugfix: manage screen_top and cursor when resizing
  • [5] LS55YKGW switch copy/paste to ctrl- hotkeys
  • [6] SVJZZDC3 snapshot - no, that's all wrong
  • [7] KECEMMMR extract couple of functions
  • [8] ZPUQSPQP extract a few methods
  • [9] HOSPP2AN crisp font rendering
  • [10] CBPV5SSI stop handling nil screen_line_starting_pos everywhere
  • [11] MDXGMZU2 disable all debug prints
  • [12] ESETRNLB bugfix: printing the first part of a line at the bottom made it seem non-wrapping
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] OTIBCAUJ love2d scaffold

Change contents

  • replacement in text.lua at line 512
    [3.6455][3.6455:6500]()
    if Text.lt1(Screen_bottom1, botline1) then
    [3.6455]
    [3.6500]
    if Text.cursor_past_screen_bottom() then
  • replacement in text.lua at line 578
    [5.1327][3.6713:6870]()
    local _,botpos = Text.pos_at_start_of_cursor_screen_line()
    local botline1 = {line=Cursor1.line, pos=botpos}
    if Text.lt1(Screen_bottom1, botline1) then
    [5.1327]
    [3.6870]
    if Text.cursor_past_screen_bottom() then
  • replacement in text.lua at line 942
    [4.895][4.895:956]()
    App.draw()
    if Text.lt1(Screen_bottom1, Cursor1) then
    [4.895]
    [4.956]
    if Text.cursor_past_screen_bottom() then
  • edit in text.lua at line 948
    [4.1156]
    [4.1156]
    end
    -- slightly expensive since it redraws the screen
    function Text.cursor_past_screen_bottom()
    App.draw()
    return Cursor_y >= App.screen.height - Line_height
    -- this approach is cheaper and almost works, except on the final screen
    -- where file ends above bottom of screen
    --? local _,botpos = Text.pos_at_start_of_cursor_screen_line()
    --? local botline1 = {line=Cursor1.line, pos=botpos}
    --? return Text.lt1(Screen_bottom1, botline1)
  • replacement in main.lua at line 520
    [2.134][2.134:205]()
    App.draw()
    if Cursor_y >= App.screen.height - Line_height then
    [2.134]
    [2.264]
    if Text.cursor_past_screen_bottom() then