Skip to content

Commit 77903f2

Browse files
committed
run format
1 parent 6b1795d commit 77903f2

File tree

11 files changed

+218
-196
lines changed

11 files changed

+218
-196
lines changed

src/Edit/Interface/edit_complete.cpp

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ find_completions (drd_info drd, tree t, hashset<string>& h, string prefix= "") {
5858
static array<string>
5959
find_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) {
275280
void
276281
edit_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++)

src/Edit/Interface/edit_interface.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class edit_interface_rep : virtual public editor_rep {
234234
void handle_set_zoom_factor (double zoomf);
235235
void handle_clear (renderer win, SI x1, SI y1, SI x2, SI y2);
236236
void handle_repaint (renderer win, SI x1, SI y1, SI x2, SI y2);
237-
void handle_set_input_normal();
237+
void handle_set_input_normal ();
238238

239239
friend class interactive_command_rep;
240240
friend class tm_window_rep;

src/Edit/Interface/edit_keyboard.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ edit_interface_rep::try_shortcut (string comb) {
154154
if ((status & 1) == 1) cmd ();
155155
else if (N (shorth) > 0 && comb != "S-F5") {
156156
call ("kbd-insert", shorth);
157-
if (get_input_mode() == INPUT_COMPLETE)
158-
exec_delayed (scheme_cmd("(kbd-variant (focus-tree) #t)"));
157+
if (get_input_mode () == INPUT_COMPLETE)
158+
exec_delayed (scheme_cmd ("(kbd-variant (focus-tree) #t)"));
159159
}
160160
// cout << "Mark= " << sh_mark << "\n";
161161
return true;
@@ -309,18 +309,18 @@ edit_interface_rep::key_press (string gkey) {
309309
archive_state ();
310310
call ("kbd-insert", rew);
311311
cout << "Inserted single character1: " << rew << "\n";
312-
if (get_input_mode() == INPUT_COMPLETE){
312+
if (get_input_mode () == INPUT_COMPLETE) {
313313
cout << "Exec delayed complete-try\n";
314-
//exec_delayed (scheme_cmd("(if (complete-try?) (noop))"));
315-
exec_delayed (scheme_cmd("(kbd-variant (focus-tree) #t)"));
316-
}
314+
// exec_delayed (scheme_cmd("(if (complete-try?) (noop))"));
315+
exec_delayed (scheme_cmd ("(kbd-variant (focus-tree) #t)"));
316+
}
317317
}
318318
interrupt_shortcut ();
319319
}
320320
else if (contains_unicode_char (rew)) {
321321
archive_state ();
322322
call ("kbd-insert", key);
323-
cout << "Inserted single character2: " << rew << "\n";
323+
cout << "Inserted single character2: " << rew << "\n";
324324
interrupt_shortcut ();
325325
}
326326
#ifdef Q_OS_MAC
@@ -335,13 +335,13 @@ edit_interface_rep::key_press (string gkey) {
335335
!inside_active_graphics ()) {
336336
archive_state ();
337337
call ("kbd-insert", "<" * key * ">");
338-
cout << "Inserted single character3: " << rew << "\n";
338+
cout << "Inserted single character3: " << rew << "\n";
339339
interrupt_shortcut ();
340340
}
341341
else if (N (key) > 1 && !is_combo_shortcuts (key) && key != "escape") {
342342
archive_state ();
343343
call ("insert", key);
344-
cout << "Inserted single character4: " << rew << "\n";
344+
cout << "Inserted single character4: " << rew << "\n";
345345
interrupt_shortcut ();
346346
}
347347
else {

src/Plugins/Qt/QTMScrollView.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ QTMScrollView::scrollContentsBy (int dx, int dy) {
188188
if (dx) p_origin.setX (p_origin.x () - dx);
189189
if (dy) p_origin.setY (p_origin.y () - dy);
190190
qDebug () << "QTMScrollView::scrollContentsBy: "
191-
<< "dx=" << dx << ", dy=" << dy
192-
<< ", new origin: " << p_origin.x () << ", " << p_origin.y ();
191+
<< "dx=" << dx << ", dy=" << dy << ", new origin: " << p_origin.x ()
192+
<< ", " << p_origin.y ();
193193
}
194194

195195
bool

src/Plugins/Qt/QTMWidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ QTMWidget::tm_widget () const {
8585

8686
void
8787
QTMWidget::scrollContentsBy (int dx, int dy) {
88-
//tm_widget() -> scroll_completion_listbox_by (dx, dy);
88+
// tm_widget() -> scroll_completion_listbox_by (dx, dy);
8989
QTMScrollView::scrollContentsBy (dx, dy);
9090
the_gui->force_update ();
91-
tm_widget ()->scroll_completion_listbox_by(dx, dy);
91+
tm_widget ()->scroll_completion_listbox_by (dx, dy);
9292
// we force an update of the internal state to be in sync with the moving
9393
// scrollbars
9494
}

0 commit comments

Comments
 (0)