Merge text0
This commit is contained in:
commit
561c94bbb0
7
edit.lua
7
edit.lua
|
@ -185,12 +185,12 @@ function edit.mouse_released(State, x,y, mouse_button)
|
|||
end
|
||||
|
||||
function edit.textinput(State, t)
|
||||
for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll
|
||||
if State.search_term then
|
||||
State.search_term = State.search_term..t
|
||||
State.search_text = nil
|
||||
Text.search_next(State)
|
||||
else
|
||||
for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll
|
||||
Text.textinput(State, t)
|
||||
end
|
||||
schedule_save(State)
|
||||
|
@ -351,6 +351,7 @@ function edit.run_after_textinput(State, t)
|
|||
edit.textinput(State, t)
|
||||
edit.key_released(State, t)
|
||||
App.screen.contents = {}
|
||||
edit.update(State, 0)
|
||||
edit.draw(State, Text_color)
|
||||
end
|
||||
|
||||
|
@ -359,6 +360,7 @@ function edit.run_after_keychord(State, chord)
|
|||
edit.keychord_pressed(State, chord)
|
||||
edit.key_released(State, chord)
|
||||
App.screen.contents = {}
|
||||
edit.update(State, 0)
|
||||
edit.draw(State, Text_color)
|
||||
end
|
||||
|
||||
|
@ -368,6 +370,7 @@ function edit.run_after_mouse_click(State, x,y, mouse_button)
|
|||
App.fake_mouse_release(x,y, mouse_button)
|
||||
edit.mouse_released(State, x,y, mouse_button)
|
||||
App.screen.contents = {}
|
||||
edit.update(State, 0)
|
||||
edit.draw(State, Text_color)
|
||||
end
|
||||
|
||||
|
@ -375,6 +378,7 @@ function edit.run_after_mouse_press(State, x,y, mouse_button)
|
|||
App.fake_mouse_press(x,y, mouse_button)
|
||||
edit.mouse_pressed(State, x,y, mouse_button)
|
||||
App.screen.contents = {}
|
||||
edit.update(State, 0)
|
||||
edit.draw(State, Text_color)
|
||||
end
|
||||
|
||||
|
@ -382,5 +386,6 @@ function edit.run_after_mouse_release(State, x,y, mouse_button)
|
|||
App.fake_mouse_release(x,y, mouse_button)
|
||||
edit.mouse_released(State, x,y, mouse_button)
|
||||
App.screen.contents = {}
|
||||
edit.update(State, 0)
|
||||
edit.draw(State, Text_color)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue