mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
textbox/keybinding: Reindent
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
parent
5b0964ae32
commit
67c9fe158a
1 changed files with 60 additions and 60 deletions
120
source/textbox.c
120
source/textbox.c
|
@ -533,67 +533,67 @@ int textbox_keybinding ( textbox *tb, unsigned int modstate, xkb_keysym_t key )
|
|||
int old_blink = tb->blink;
|
||||
tb->blink = 2;
|
||||
|
||||
// Left or Ctrl-b
|
||||
if ( abe_test_action ( MOVE_CHAR_BACK, modstate, key ) ) {
|
||||
textbox_cursor_dec ( tb );
|
||||
return 2;
|
||||
}
|
||||
// Right or Ctrl-F
|
||||
else if ( abe_test_action ( MOVE_CHAR_FORWARD, modstate, key ) ) {
|
||||
textbox_cursor_inc ( tb );
|
||||
return 2;
|
||||
}
|
||||
// Left or Ctrl-b
|
||||
if ( abe_test_action ( MOVE_CHAR_BACK, modstate, key ) ) {
|
||||
textbox_cursor_dec ( tb );
|
||||
return 2;
|
||||
}
|
||||
// Right or Ctrl-F
|
||||
else if ( abe_test_action ( MOVE_CHAR_FORWARD, modstate, key ) ) {
|
||||
textbox_cursor_inc ( tb );
|
||||
return 2;
|
||||
}
|
||||
|
||||
// Ctrl-U: Kill from the beginning to the end of the line.
|
||||
else if ( abe_test_action ( CLEAR_LINE, modstate, key ) ) {
|
||||
textbox_text ( tb, "" );
|
||||
return 1;
|
||||
}
|
||||
// Ctrl-A
|
||||
else if ( abe_test_action ( MOVE_FRONT, modstate, key ) ) {
|
||||
textbox_cursor ( tb, 0 );
|
||||
return 2;
|
||||
}
|
||||
// Ctrl-E
|
||||
else if ( abe_test_action ( MOVE_END, modstate, key ) ) {
|
||||
textbox_cursor_end ( tb );
|
||||
return 2;
|
||||
}
|
||||
// Ctrl-Alt-h
|
||||
else if ( abe_test_action ( REMOVE_WORD_BACK, modstate, key ) ) {
|
||||
textbox_cursor_bkspc_word ( tb );
|
||||
return 1;
|
||||
}
|
||||
// Ctrl-Alt-d
|
||||
else if ( abe_test_action ( REMOVE_WORD_FORWARD, modstate, key ) ) {
|
||||
textbox_cursor_del_word ( tb );
|
||||
return 1;
|
||||
} // Delete or Ctrl-D
|
||||
else if ( abe_test_action ( REMOVE_CHAR_FORWARD, modstate, key ) ) {
|
||||
textbox_cursor_del ( tb );
|
||||
return 1;
|
||||
}
|
||||
// Alt-B
|
||||
else if ( abe_test_action ( MOVE_WORD_BACK, modstate, key ) ) {
|
||||
textbox_cursor_dec_word ( tb );
|
||||
return 2;
|
||||
}
|
||||
// Alt-F
|
||||
else if ( abe_test_action ( MOVE_WORD_FORWARD, modstate, key ) ) {
|
||||
textbox_cursor_inc_word ( tb );
|
||||
return 2;
|
||||
}
|
||||
// BackSpace, Ctrl-h
|
||||
else if ( abe_test_action ( REMOVE_CHAR_BACK, modstate, key ) ) {
|
||||
textbox_cursor_bkspc ( tb );
|
||||
return 1;
|
||||
}
|
||||
else if ( abe_test_action ( ACCEPT_CUSTOM, modstate, key ) ) {
|
||||
return -2;
|
||||
}
|
||||
else if ( abe_test_action ( ACCEPT_ENTRY, modstate, key ) ) {
|
||||
return -1;
|
||||
}
|
||||
// Ctrl-U: Kill from the beginning to the end of the line.
|
||||
else if ( abe_test_action ( CLEAR_LINE, modstate, key ) ) {
|
||||
textbox_text ( tb, "" );
|
||||
return 1;
|
||||
}
|
||||
// Ctrl-A
|
||||
else if ( abe_test_action ( MOVE_FRONT, modstate, key ) ) {
|
||||
textbox_cursor ( tb, 0 );
|
||||
return 2;
|
||||
}
|
||||
// Ctrl-E
|
||||
else if ( abe_test_action ( MOVE_END, modstate, key ) ) {
|
||||
textbox_cursor_end ( tb );
|
||||
return 2;
|
||||
}
|
||||
// Ctrl-Alt-h
|
||||
else if ( abe_test_action ( REMOVE_WORD_BACK, modstate, key ) ) {
|
||||
textbox_cursor_bkspc_word ( tb );
|
||||
return 1;
|
||||
}
|
||||
// Ctrl-Alt-d
|
||||
else if ( abe_test_action ( REMOVE_WORD_FORWARD, modstate, key ) ) {
|
||||
textbox_cursor_del_word ( tb );
|
||||
return 1;
|
||||
} // Delete or Ctrl-D
|
||||
else if ( abe_test_action ( REMOVE_CHAR_FORWARD, modstate, key ) ) {
|
||||
textbox_cursor_del ( tb );
|
||||
return 1;
|
||||
}
|
||||
// Alt-B
|
||||
else if ( abe_test_action ( MOVE_WORD_BACK, modstate, key ) ) {
|
||||
textbox_cursor_dec_word ( tb );
|
||||
return 2;
|
||||
}
|
||||
// Alt-F
|
||||
else if ( abe_test_action ( MOVE_WORD_FORWARD, modstate, key ) ) {
|
||||
textbox_cursor_inc_word ( tb );
|
||||
return 2;
|
||||
}
|
||||
// BackSpace, Ctrl-h
|
||||
else if ( abe_test_action ( REMOVE_CHAR_BACK, modstate, key ) ) {
|
||||
textbox_cursor_bkspc ( tb );
|
||||
return 1;
|
||||
}
|
||||
else if ( abe_test_action ( ACCEPT_CUSTOM, modstate, key ) ) {
|
||||
return -2;
|
||||
}
|
||||
else if ( abe_test_action ( ACCEPT_ENTRY, modstate, key ) ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
tb->blink = old_blink;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue