diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-03-26 09:36:41 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-03-26 09:36:41 -0700 |
commit | eae5c9505c665b343af7690d9665431ae17ed5e9 (patch) | |
tree | 046b87f9af87ff6510e3fed2076032593a36dd24 /edit.lua | |
parent | 0ae94b0de59618bb86a55edcaa8e961abb192f2d (diff) | |
download | text.love-eae5c9505c665b343af7690d9665431ae17ed5e9.tar.gz |
bugfix: naming points
Diffstat (limited to 'edit.lua')
-rw-r--r-- | edit.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/edit.lua b/edit.lua index 38c2883..3cea87f 100644 --- a/edit.lua +++ b/edit.lua @@ -226,7 +226,7 @@ end function edit.mouse_press(State, x,y, mouse_button) if State.search_term then return end ---? print('press', State.selection1.line, State.selection1.pos) +--? print('press', State.cursor1.line) if mouse_press_consumed_by_any_button_handler(State, x,y, mouse_button) then -- press on a button and it returned 'true' to short-circuit return @@ -269,7 +269,7 @@ end function edit.mouse_release(State, x,y, mouse_button) if State.search_term then return end ---? print('release') +--? print('release', State.cursor1.line) if State.lines.current_drawing then Drawing.mouse_release(State, x,y, mouse_button) schedule_save(State) @@ -321,11 +321,12 @@ function edit.mouse_wheel_move(State, dx,dy) end function edit.text_input(State, t) +--? print('text input', t) if State.search_term then State.search_term = State.search_term..t State.search_text = nil Text.search_next(State) - elseif State.current_drawing_mode == 'name' then + elseif State.lines.current_drawing and State.current_drawing_mode == 'name' then local before = snapshot(State, State.lines.current_drawing_index) local drawing = State.lines.current_drawing local p = drawing.points[drawing.pending.target_point] @@ -478,7 +479,7 @@ function edit.keychord_press(State, chord, key) line.show_help = false end end - elseif State.current_drawing_mode == 'name' then + elseif State.lines.current_drawing and State.current_drawing_mode == 'name' then if chord == 'return' then State.current_drawing_mode = State.previous_drawing_mode State.previous_drawing_mode = nil |