@@ -58,7 +58,7 @@ find_completions (drd_info drd, tree t, hashset<string>& h, string prefix= "") {
5858static array<string>
5959find_completions (drd_info drd, tree t, string prefix= " " ) {
6060 hashset<string> h;
61- h->insert (string (" " ));
61+ h->insert (string (" " ));
6262 find_completions (drd, t, h, prefix);
6363 return as_completions (h);
6464}
@@ -135,17 +135,20 @@ edit_interface_rep::complete_start (string prefix, array<string> compls) {
135135 completions = close_completions (compls);
136136 completion_pos = 0 ;
137137 {
138- // TODO: ?refactor this part to edit_interface_rep::show_completion_listbox
138+ // TODO: ?refactor this part to
139+ // edit_interface_rep::show_completion_listbox
139140 cout << " complete_start: "
140- // << "completions=" << completions
141- << " , prefix=" << completion_prefix
142- // << ", tp=" << tp
143- // << ", et=" << et
144- // << ", eb=" << eb
141+ // << "completions=" << completions
142+ << " , prefix="
143+ << completion_prefix
144+ // << ", tp=" << tp
145+ // << ", et=" << et
146+ // << ", eb=" << eb
145147 << LF;
146148 array<string> full_completions;
147149 for (int i= 0 ; i < N (completions); ++i) {
148- cout << " complete_start: completions[" << i << " ]=" << completions[i] << LF;
150+ cout << " complete_start: completions[" << i << " ]=" << completions[i]
151+ << LF;
149152 string c= completions[i];
150153 full_completions << (completion_prefix * c);
151154 }
@@ -155,14 +158,13 @@ edit_interface_rep::complete_start (string prefix, array<string> compls) {
155158 }
156159 cursor cu= eb->find_check_cursor (tp1);
157160 cout << " show_completion_listbox: "
158- << " completions=" << full_completions
159- << " , cu->ox=" << cu->ox
160- << " , cu->oy=" << cu->oy
161- << " , magf=" << magf
161+ << " completions=" << full_completions << " , cu->ox=" << cu->ox
162+ << " , cu->oy=" << cu->oy << " , magf=" << magf
162163 << " , scroll_x=" << get_scroll_x ()
163164 << " , scroll_y=" << get_scroll_y ()
164165 << " , canvas_x=" << get_canvas_x () << LF;
165- show_completion_listbox (tp, full_completions, cu, magf, get_scroll_x (), get_scroll_y (), get_canvas_x ());
166+ show_completion_listbox (tp, full_completions, cu, magf, get_scroll_x (),
167+ get_scroll_y (), get_canvas_x ());
166168 }
167169 insert_tree (completions[0 ]);
168170 complete_message ();
@@ -187,9 +189,10 @@ edit_interface_rep::complete_keypress (string key) {
187189 SERVER (set_completion_listbox_visible (false ));
188190 return false ;
189191 }
190- else if ((key != " tab" ) && (key != " S-tab" ) && (key != " up" ) && (key != " down" )) {
191- // set_input_normal ();
192- // SERVER (set_completion_listbox_visible (false));
192+ else if ((key != " tab" ) && (key != " S-tab" ) && (key != " up" ) &&
193+ (key != " down" )) {
194+ // set_input_normal ();
195+ // SERVER (set_completion_listbox_visible (false));
193196 return false ;
194197 }
195198 tree st= subtree (et, path_up (tp));
@@ -220,8 +223,10 @@ edit_interface_rep::complete_keypress (string key) {
220223 remove (path_up (tp) * (end - N (old_s)), N (old_s));
221224 insert (path_up (tp) * (end - N (old_s)), new_s);
222225 complete_message ();
223- apply_changes (); // sync eb, for calculating the new cursor position
224- update_completion_listbox_position (et, eb, tp, magf, get_scroll_x (), get_scroll_y (), get_canvas_x (), completion_pos);
226+ apply_changes (); // sync eb, for calculating the new cursor position
227+ update_completion_listbox_position (et, eb, tp, magf, get_scroll_x (),
228+ get_scroll_y (), get_canvas_x (),
229+ completion_pos);
225230 return true ;
226231}
227232
@@ -275,8 +280,8 @@ edit_interface_rep::session_complete_command (tree tt) {
275280void
276281edit_interface_rep::custom_complete (tree r) {
277282 if (!is_tuple (r)) return ;
278- int i, n= N (r);
279- string prefix;
283+ int i, n= N (r);
284+ string prefix;
280285 hashset<string> compls;
281286 compls << string (" " );
282287 for (i= 0 ; i < n; i++)
0 commit comments