more precise search highlighting

[?]
Jun 3, 2022, 9:37 PM
FHSZYAZ2KCHJM4BN2TAPYZMWTLTIE23SWKDYLCQOQIVL4263HDRQC

Dependencies

  • [2] HIKLULFQ extract a function
  • [3] HOSPP2AN crisp font rendering
  • [4] Z4XRNDTR find text
  • [5] 2RXZ3PGO beginning of a new approach to scroll+wrap
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] LXTTOB33 extract a couple of files

Change contents

  • replacement in text.lua at line 65
    [3.142][3.142:319](),[3.319][3.335:420]()
    if Search_text == nil then
    Search_text = App.newText(love.graphics.getFont(), Search_term)
    end
    love.graphics.setColor(0.7,1,1)
    love.graphics.rectangle('fill', x,y, App.width(Search_text),Line_height)
    [3.142]
    [3.429]
    local lo_px = Text.draw_highlight(line, x,y, pos, Cursor1.pos, Cursor1.pos+utf8.len(Search_term))
  • replacement in text.lua at line 67
    [3.471][3.421:471]()
    love.graphics.print(Search_term, x,y)
    [3.471]
    [3.530]
    love.graphics.print(Search_term, x+lo_px,y)
  • edit in select.lua at line 54
    [2.177]
    [2.177]
    -- Creates text objects every time, so use this sparingly.
    -- Returns some intermediate computation useful elsewhere.
  • edit in select.lua at line 76
    [2.999]
    [8.45803]
    return lo_px