Mercurial Hosting > editor
comparison src/luan_editor/window.luan @ 49:c17c5312e8de
minor
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Wed, 21 May 2025 11:50:10 -0600 |
| parents | ca5ae0a36db7 |
| children | 3f4c3722b78b |
comparison
equal
deleted
inserted
replaced
| 48:ca5ae0a36db7 | 49:c17c5312e8de |
|---|---|
| 103 end | 103 end |
| 104 local function remove_list_window_item(item) | 104 local function remove_list_window_item(item) |
| 105 list_view.remove_element(item) --or error() | 105 list_view.remove_element(item) --or error() |
| 106 end | 106 end |
| 107 list_view.add_list_selection_listener( function(item) | 107 list_view.add_list_selection_listener( function(item) |
| 108 item.window.text_area.request_focus() | 108 if item ~= nil then |
| 109 item.window.text_area.request_focus() | |
| 110 end | |
| 109 end ) | 111 end ) |
| 110 | 112 |
| 111 local black = int_to_color(0x000000) | 113 local black = int_to_color(0x000000) |
| 112 local dark_blue = int_to_color(0x0000C0) | 114 local dark_blue = int_to_color(0x0000C0) |
| 113 local grey = int_to_color(0x888888) | 115 local grey = int_to_color(0x888888) |
| 150 end | 152 end |
| 151 end | 153 end |
| 152 end | 154 end |
| 153 text_area.set_selection(0) | 155 text_area.set_selection(0) |
| 154 local list_window_item = { | 156 local list_window_item = { |
| 155 --text = title | |
| 156 window = window | 157 window = window |
| 157 } | 158 } |
| 158 add_list_window_item(list_window_item) | 159 add_list_window_item(list_window_item) |
| 159 local status_bar = new_label{ | 160 local status_bar = new_label{ |
| 160 constraints = "span,growx" | 161 constraints = "span,growx" |
