drop some redundant args when clearing the cache

[?]
Jul 17, 2022, 3:18 PM
LSYLEVBDBZBGLSCXTRBW46WT4TUMMSPCH7M6HSNYI5SIH2WNPYEAC

Dependencies

  • [2] QCPXQ2E3 add state arg to a few functions
  • [3] BULPIBEG beginnings of a module for the text editor
  • [4] CG3264MM move
  • [5] 7LVK4KRD fix a failing test
  • [6] 4CTZOJPC stop pretending globals are local
  • [7] KOYAJWE4 extract a couple more methods
  • [8] Z5HLXU4P add state arg to a few functions
  • [9] LF7BWEG4 group all editor globals
  • [10] LXTTOB33 extract a couple of files
  • [11] XNFTJHC4 split keyboard handling between Text and Drawing
  • [12] SPSW74Y5 add state arg to Text.keychord_pressed
  • [13] WOXIYUTL bugfix: manage screen_top and cursor when resizing
  • [14] OGUV4HSA remove some memory leaks from rendered fragments
  • [15] HOSPP2AN crisp font rendering
  • [16] PX7DDEMO autosave slightly less aggressively
  • [17] S2MISTTM add state arg to a few functions
  • [18] MYC7XR5Q bugfix: lines that aren't drawn from the start
  • [19] HMODUNJE scroll on backspace
  • [20] AYE2VEGJ extract a couple of methods
  • [21] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [22] 2ZYV7D3W handle tab characters
  • [23] 4J2L6JMR bugfix: deleting a selection spanning pages
  • [24] PLKNHYZ4 extract a function
  • [25] PTDO2SOT add state arg to schedule_save
  • [26] 65XHTZEK regression: couldn't do many drawing operations because line.y was reset
  • [27] GN3IF4WF bugfix: pasting newlines
  • [28] KZ5GAYRP this fixes the immediate regression
  • [29] R53OF3ON one bug I've repeatedly run into while testing with Moby Dick

Change contents

  • replacement in text.lua at line 155
    [3.344][3.344:396]()
    Text.clear_cache(State.lines[State.cursor1.line])
    [3.344]
    [3.396]
    Text.clear_screen_line_cache(State, State.cursor1.line)
  • replacement in text.lua at line 221
    [3.3000][3.2756:2810]()
    Text.clear_cache(State.lines[State.cursor1.line])
    [3.3000]
    [3.2810]
    Text.clear_screen_line_cache(State, State.cursor1.line)
  • replacement in text.lua at line 257
    [3.3922][3.4211:4265]()
    Text.clear_cache(State.lines[State.cursor1.line])
    [3.3922]
    [3.137]
    Text.clear_screen_line_cache(State, State.cursor1.line)
  • replacement in text.lua at line 349
    [3.2389][3.2389:2495]()
    Text.clear_cache(State.lines[State.cursor1.line])
    Text.clear_cache(State.lines[State.cursor1.line+1])
    [3.2389]
    [3.2495]
    Text.clear_screen_line_cache(State, State.cursor1.line)
    Text.clear_screen_line_cache(State, State.cursor1.line+1)
  • replacement in text.lua at line 987
    [3.732][2.5912:5951]()
    for _,line in ipairs(State.lines) do
    [3.732]
    [3.1828]
    for line_index,line in ipairs(State.lines) do
  • replacement in text.lua at line 990
    [3.1874][3.317:344](),[3.20][3.317:344]()
    Text.clear_cache(line)
    [3.1874]
    [3.2910]
    Text.clear_screen_line_cache(State, line_index)
  • replacement in text.lua at line 994
    [3.2921][3.345:438]()
    function Text.clear_cache(line)
    line.fragments = nil
    line.screen_line_starting_pos = nil
    [3.2921]
    [3.438]
    function Text.clear_screen_line_cache(State, line_index)
    State.lines[line_index].fragments = nil
    State.lines[line_index].screen_line_starting_pos = nil
  • replacement in select.lua at line 140
    [3.47298][3.2618:2656]()
    Text.clear_cache(State.lines[minl])
    [3.47298]
    [3.2656]
    Text.clear_screen_line_cache(State, minl)