switch to line index in a function

[?]
Jul 17, 2022, 4:10 PM
ODLKHO7BO2AODYO2OEQ6D4NSNBT5GR3CKLUXWMDLRYXL7DJOI7BAC

Dependencies

  • [2] MXA3RZYK deduce left/right from state where possible
  • [3] ESETRNLB bugfix: printing the first part of a line at the bottom made it seem non-wrapping
  • [4] CCYSVZA2 bugfix: BSOD in #4.
  • [5] UV4EWOLY add args to some functions
  • [6] NDHQN23G done passing left/right margins everywhere
  • [7] 4CTZOJPC stop pretending globals are local
  • [8] WLJCIXYM add state arg to a few functions
  • [9] QCPXQ2E3 add state arg to a few functions
  • [10] M6TH7VSZ rip out notion of Line_width
  • [11] R53OF3ON one bug I've repeatedly run into while testing with Moby Dick
  • [12] P66MRF3U bugfix: don't append metadata when it already exists
  • [13] LF7BWEG4 group all editor globals
  • [14] Z5HLXU4P add state arg to a few functions
  • [15] SPSW74Y5 add state arg to Text.keychord_pressed
  • [16] JY4VK7L2 rename
  • [17] ZPUQSPQP extract a few methods
  • [18] 3MAZEQK5 add state arg to Text.textinput
  • [19] BULPIBEG beginnings of a module for the text editor
  • [20] LERERVPH keep one screen line of overlap on pagedown
  • [21] 242L3OQX bugfix: ensure Cursor_line is always on a text line
  • [22] CBPV5SSI stop handling nil screen_line_starting_pos everywhere
  • [23] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [24] EGH7XDBK support non-text lines in Text.to2
  • [25] 3OKKTUT4 up and down arrow now moving by screen line where possible
  • [26] 2ZYV7D3W handle tab characters
  • [27] H2DPLWMV snapshot: wrapping long lines at word boundaries
  • [28] MYC7XR5Q bugfix: lines that aren't drawn from the start
  • [29] HYEAFRZ2 split mouse_pressed events between Text and Drawing
  • [30] WOXIYUTL bugfix: manage screen_top and cursor when resizing
  • [31] UHB4GARJ left/right margin -> left/right coordinates
  • [32] GCEF4N3V stop repeatedly checking for line wrapping
  • [33] KZ5GAYRP this fixes the immediate regression
  • [34] OYXDYPGS get rid of debug variables
  • [35] 5UG5PQ6K undo commit 861c57b533
  • [36] 4VKEE43Z bugfix
  • [37] 2H67P75X switch arg for a function
  • [38] CTJ3IZGS add args to some functions
  • [39] DRFE3B3Z mouse buttons are integers, not strings
  • [40] SVJZZDC3 snapshot - no, that's all wrong
  • [41] PFT5Y2ZY move
  • [42] HOSPP2AN crisp font rendering
  • [43] LAW2O3NW extract variable Margin_left

Change contents

  • replacement in text.lua at line 24
    [3.109][2.136:208]()
    Text.populate_screen_line_starting_pos(line, State.left, State.right)
    [3.109]
    [3.1]
    Text.populate_screen_line_starting_pos(State, line_index)
  • replacement in text.lua at line 145
    [3.302][3.15084:15185]()
    Text.populate_screen_line_starting_pos(State.lines[State.cursor1.line], State.left, State.right)
    [3.302]
    [3.15185]
    Text.populate_screen_line_starting_pos(State, State.cursor1.line)
  • replacement in text.lua at line 178
    [3.720][3.15335:15438]()
    Text.populate_screen_line_starting_pos(State.lines[State.cursor1.line], State.left, State.right)
    [3.720]
    [3.15438]
    Text.populate_screen_line_starting_pos(State, State.cursor1.line)
  • replacement in text.lua at line 417
    [3.4182][2.918:1023]()
    Text.populate_screen_line_starting_pos(State.lines[State.cursor1.line], State.left, State.right)
    [3.4182]
    [3.826]
    Text.populate_screen_line_starting_pos(State, State.cursor1.line)
  • replacement in text.lua at line 621
    [2.2343][2.2343:2442]()
    Text.populate_screen_line_starting_pos(State.lines[State.cursor1.line], State.left, State.right)
    [2.2343]
    [3.617]
    Text.populate_screen_line_starting_pos(State, State.cursor1.line)
  • replacement in text.lua at line 632
    [2.2492][2.2492:2591]()
    Text.populate_screen_line_starting_pos(State.lines[State.cursor1.line], State.left, State.right)
    [2.2492]
    [3.1960]
    Text.populate_screen_line_starting_pos(State, State.cursor1.line)
  • replacement in text.lua at line 701
    [3.1129][2.2968:3040]()
    Text.populate_screen_line_starting_pos(line, State.left, State.right)
    [3.1129]
    [3.3928]
    Text.populate_screen_line_starting_pos(State, line_index)
  • replacement in text.lua at line 843
    [3.7808][2.3426:3516]()
    Text.populate_screen_line_starting_pos(State.lines[pos1.line], State.left, State.right)
    [3.7808]
    [3.4336]
    Text.populate_screen_line_starting_pos(State, pos1.line)
  • replacement in text.lua at line 907
    [3.4767][2.3566:3660]()
    Text.populate_screen_line_starting_pos(State.lines[pos2.line-1], State.left, State.right)
    [3.4767]
    [3.4849]
    Text.populate_screen_line_starting_pos(State, pos2.line-1)
  • replacement in text.lua at line 912
    [3.8448][3.729:796]()
    function Text.populate_screen_line_starting_pos(line, left, right)
    [3.8448]
    [3.70]
    function Text.populate_screen_line_starting_pos(State, line_index)
    local line = State.lines[line_index]
  • replacement in text.lua at line 919
    [3.2315][3.669:715]()
    Text.compute_fragments(line, left, right)
    [3.2315]
    [3.2360]
    Text.compute_fragments(line, State.left, State.right)
  • replacement in text.lua at line 922
    [3.129][3.797:814]()
    local x = left
    [3.129]
    [3.2381]
    local x = State.left
  • replacement in text.lua at line 928
    [3.3986][3.815:865]()
    if x + frag_width > right then
    x = left
    [3.3986]
    [3.194]
    if x + frag_width > State.right then
    x = State.left
  • edit in text.lua at line 942
    [3.5125]
    [3.5125]
    Text.populate_screen_line_starting_pos(State, State.screen_top1.line)
  • edit in text.lua at line 944
    [3.5176][2.3711:3783]()
    Text.populate_screen_line_starting_pos(line, State.left, State.right)