switch to the new readonly support

In the process I found a bug: enter/backspace can modify the left-most
column. Anyways, it's now fixed. Let's see how this looks now..
This commit is contained in:
Kartik K. Agaram 2023-06-07 22:38:57 -07:00
parent 0fd84b149c
commit 95404cf799
2 changed files with 4 additions and 9 deletions

View File

@ -1,6 +1,4 @@
on.text_input = function(t)
if Editors[1].search_term then
edit.text_input(Editors[1], t)
resync_editors()
end
edit.text_input(Editors[1], t, --[[readonly]] true)
resync_editors()
end

View File

@ -6,11 +6,8 @@ on.keychord_press = function(chord, key)
initialize_editors(Editors[1].font_height+2, Editors[1].filename, Editors[1].screen_top1)
elseif chord == 'C--' then
initialize_editors(Editors[1].font_height-2, Editors[1].filename, Editors[1].screen_top1)
elseif chord == 'C-f' or chord == 'backspace' or chord == 'return' then
-- find in just the left-most pane for now
edit.keychord_press(Editors[1], chord, key)
elseif chord == 'pageup' or chord == 'pagedown' or Editors[1].search_term then
edit.keychord_press(Editors[1], chord, key)
else
edit.keychord_press(Editors[1], chord, key, --[[readonly]] true)
resync_editors()
end
end