mirror of
https://github.com/Tha14/toxic.git
synced 2025-12-14 00:36:36 +01:00
Add settings option to set paste-mode key and update docs
This commit is contained in:
21
src/input.c
21
src/input.c
@@ -262,10 +262,6 @@ bool input_handle(ToxWindow *self, wint_t key, int x, int y, int mx_x, int mx_y)
|
||||
force_refresh(self->chatwin->history);
|
||||
break;
|
||||
|
||||
case T_KEY_C_T:
|
||||
self->chatwin->pastemode ^= 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
match = false;
|
||||
break;
|
||||
@@ -273,13 +269,18 @@ bool input_handle(ToxWindow *self, wint_t key, int x, int y, int mx_x, int mx_y)
|
||||
|
||||
/* TODO: this special case is ugly.
|
||||
maybe convert entire function to if/else and make them all customizable keys? */
|
||||
if (!match && key == user_settings->key_toggle_peerlist) {
|
||||
if (self->is_groupchat) {
|
||||
self->show_peerlist ^= 1;
|
||||
redraw_groupchat_win(self);
|
||||
if (!match) {
|
||||
if (key == user_settings->key_toggle_peerlist) {
|
||||
if (self->is_groupchat) {
|
||||
self->show_peerlist ^= 1;
|
||||
redraw_groupchat_win(self);
|
||||
}
|
||||
match = true;
|
||||
}
|
||||
else if (key == user_settings->key_toggle_pastemode) {
|
||||
self->chatwin->pastemode ^= 1;
|
||||
match = true;
|
||||
}
|
||||
|
||||
match = true;
|
||||
}
|
||||
|
||||
return match;
|
||||
|
||||
Reference in New Issue
Block a user