hide file numbers in output editor

akkartik
Nov 20, 2023, 5:32 AM
UPQJIFDPMKMUFFUKCDXNB3X64U4TCKLVXQGI6OQW2N7A7RSF54XAC

Dependencies

  • [2] 2TFAEKOC improve documentation for edit.draw
  • [3] O2E2MUT2 resolve conflicts
  • [4] DALNQKAV resolve conflicts
  • [5] VAVXKWZV aggregate global state inside a 'pane' object
  • [6] 4GYPLUDY streamline the interface for Text.draw
  • [7] I64IPGJX avoid saving fragments in lines
  • [8] Y3ZR4TOK Merge lines.love
  • [9] ZM7NOBRM new fork: carousel shell
  • [10] JNAQUQKB Merge lines.love
  • [11] 3HHPHDOO couple of typos
  • [12] V5SYDHPQ start thinking of compute_fragments as a detail
  • [13] ICS45BIL editor widget now takes a bottom margin
  • [14] XUGDTYW2 stop confusingly reading a global
  • [15] 5RUFNRJO start of the visual skeleton
  • [16] BW2IUB3K keep all text cache writes inside text.lua
  • [17] OV6FE23R Merge text0
  • [18] G2SVT3RO Merge text0
  • [19] R2ASHK5C fix a bad merge
  • [20] G3DLS5OU audit all asserts
  • [21] ILOA5BYF separate data structure for each line's cache data
  • [22] 3ZSUBI57 drop some redundant args from Text.draw
  • [23] 4LW3LB4J Merge text0
  • [24] WR2WMEPE implement 'Run' button
  • [25] B4H3KLKR Merge text0
  • [26] H5UZI3YN editor documentation
  • [27] 3XNFQDDN Merge lines.love
  • [*] BULPIBEG beginnings of a module for the text editor
  • [*] N2NUGNN4 include a brief reference enabling many useful apps
  • [*] 2L5MEZV3 experiment: new edit namespace

Change contents

  • replacement in text.lua at line 11
    [6.83][6.5:73]()
    function Text.draw(State, line_index, y, startpos, fg, hide_cursor)
    [6.83]
    [6.42]
    function Text.draw(State, line_index, y, startpos, fg, hide_cursor, show_line_numbers)
  • replacement in text.lua at line 19
    [6.63][6.3583:3698]()
    App.color(Line_number_color)
    love.graphics.print(line_index, State.left-Line_number_width*App.width('m')+10,y)
    [6.63]
    [6.3698]
    if show_line_numbers then
    App.color(Line_number_color)
    love.graphics.print(line_index, State.left-Line_number_width*App.width('m')+10,y)
    end
  • replacement in reference.md at line 205
    [6.641][2.8:395]()
    * `edit.draw(state, fg, hide_cursor)` -- call this from `on.draw` to display
    the current editor state on the app window as requested in the call to
    `edit.initialize_state` that created `state`. `fg` is the color for
    foreground text (`Text_color` is a good default). Set `hide_cursor` to stop
    showing a blinking cursor (usually because you want a `readonly` editor; see
    below).
    [6.641]
    [6.91]
    * `edit.draw(state, fg, hide_cursor, show_line_numbers)` -- call this from
    `on.draw` to display the current editor state on the app window as requested
    in the call to `edit.initialize_state` that created `state`. `fg` is the
    color for foreground text (`Text_color` is a good default). Set
    `hide_cursor` to stop showing a blinking cursor (usually because you want a
    `readonly` editor; see below), and `show_line_numbers` to render line
    numbers to the left of the editor.
  • replacement in edit.lua at line 110
    [6.58][6.15:58]()
    function edit.draw(State, fg, hide_cursor)
    [6.58]
    [3.16]
    function edit.draw(State, fg, hide_cursor, show_line_numbers)
  • replacement in edit.lua at line 128
    [6.1000][6.59:146]()
    y, screen_bottom1.pos = Text.draw(State, line_index, y, startpos, fg, hide_cursor)
    [6.1000]
    [6.1070]
    y, screen_bottom1.pos = Text.draw(State, line_index, y, startpos, fg, hide_cursor, show_line_numbers)
  • replacement in 0012-on.draw at line 7
    [6.1924][5.4114:4152]()
    edit.draw(Current_pane.editor_state)
    [6.1924]
    [5.4152]
    edit.draw(Current_pane.editor_state, --[[fg]] nil, --[[hide_cursor]] nil, --[[show_line_numbers]] true)