Mercurial Hosting > editor
changeset 43:48c35fdccb31
list window work
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 18 May 2025 18:47:32 -0600 |
parents | b76918e3e77c |
children | 779ea6d9d8fb |
files | src/luan_editor/window.luan |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/luan_editor/window.luan Sun May 18 14:37:06 2025 -0600 +++ b/src/luan_editor/window.luan Sun May 18 18:47:32 2025 -0600 @@ -72,6 +72,7 @@ local list_window = new_dialog{ preferred_size = { width=200, height=400 } content_pane = list_scroll_pane + focusable_window_state = false } local list_group = new_button_group() @@ -168,6 +169,9 @@ end remove_list_window_item(window.list_window_item) end) + frame.add_window_focus_listener(function() + window.list_window_item.is_selected = true + end) frame.add_resize_stopped_listener( 200, function() --logger.info(stringify(frame.size)) config.size = frame.size @@ -186,7 +190,11 @@ frame.title = s end set_title() - window.list_window_item = new_list_window_item(title) + local list_window_item = new_list_window_item(title) + list_window_item.add_action_listener(function(_) + text_area.request_focus() + end) + window.list_window_item = list_window_item window.set_title = set_title -- dont gc text_area.document.add_undo_listener(set_title) window.new = new_window