resolve conflicts

akkartik
Dec 17, 2023, 7:56 AM
5LN2NUSEFCHSFMWWMGMBNYRAUTWDWHELROWX6HKVFC573NJ2FDFAC

Dependencies

Change contents

  • file deletion: source_text.lua (----------)source_text.lua (----------)
    [7.2][7.147125:147164](),[7.147164][7.83786:83786](),[7.2][7.147125:147164]()
    assert(false, ('Text.offset(%d) called on a string of length %d (byte size %d); this is likely a failure to handle utf8\n\n^%s$\n'):format(pos1, utf8.len(s), #s, s))
    end
  • file deletion: source_text_tests.lua (----------)source_text_tests.lua (----------)
    [7.2][7.83739:83784](),[7.2][7.83739:83784](),[7.83784][7.3561:3561]()
    edit.draw(Editor_state)
    edit.run_after_mouse_press(Editor_state, Editor_state.left+8,5, 1)
    -- selection is at screen top
    check(Editor_state.selection1.line ~= nil, 'selection:line-not-nil')
    check_eq(Editor_state.selection1.line, 2, 'selection:line')
    check_eq(Editor_state.selection1.pos, 3, 'selection:pos')
    end
    function test_select_text_using_mouse_starting_below_text()
    -- I'd like to test what happens when a mouse click is below some page of
    -- text, potentially even in the middle of a line.
    -- However, it's brittle to set up a text line boundary just right.
    -- So I'm going to just check things below the bottom of the final line of
    -- text when it's in the middle of the screen.
    -- final screen line ends in the middle of screen
    App.screen.init{width=50, height=60}
    Editor_state = edit.initialize_test_state()
    Editor_state.lines = load_array{'abcde'}
    Text.redraw_all(Editor_state)
    Editor_state.cursor1 = {line=1, pos=1}
    Editor_state.screen_top1 = {line=1, pos=1}
    Editor_state.screen_bottom1 = {}
    edit.draw(Editor_state)
    local y = Editor_state.top
    App.screen.check(y, 'ab', 'baseline:screen:1')
    y = y + Editor_state.line_height
    App.screen.check(y, 'cde', 'baseline:screen:2')
    -- press mouse above first line of text
    edit.run_after_mouse_press(Editor_state, 5,App.screen.height-5, 1)
    -- selection is past bottom-most text in screen
    check(Editor_state.selection1.line ~= nil, 'selection:line-not-nil')
    check_eq(Editor_state.selection1.line, 1, 'selection:line')
    check_eq(Editor_state.selection1.pos, 6, 'selection:pos')
    end
  • file deletion: source_edit.lua (----------)source_edit.lua (----------)
    [7.2][7.165788:165827](),[7.2][7.165788:165827](),[7.165827][7.152503:152503]()
    if mouse_press_consumed_by_any_button(State, x,y, mouse_button) then
    -- press on a button and it returned 'true' to short-circuit
    return
    end