mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
* widget.c (input_callback): Don't handle Enter.
Requested by Ali Akcaagac <aliakc@web.de>
This commit is contained in:
parent
9653eb538f
commit
7c143915b4
@ -1,5 +1,8 @@
|
|||||||
2003-09-12 Pavel Roskin <proski@gnu.org>
|
2003-09-12 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* widget.c (input_callback): Don't handle Enter.
|
||||||
|
Requested by Ali Akcaagac <aliakc@web.de>
|
||||||
|
|
||||||
* chmod.c (chmod_callback): Fix uninitialized variable.
|
* chmod.c (chmod_callback): Fix uninitialized variable.
|
||||||
|
|
||||||
2003-09-11 Pavel Roskin <proski@gnu.org>
|
2003-09-11 Pavel Roskin <proski@gnu.org>
|
||||||
|
17
src/widget.c
17
src/widget.c
@ -1536,12 +1536,8 @@ cb_ret_t
|
|||||||
input_callback (WInput *in, widget_msg_t msg, int parm)
|
input_callback (WInput *in, widget_msg_t msg, int parm)
|
||||||
{
|
{
|
||||||
int v;
|
int v;
|
||||||
Dlg_head *h = in->widget.parent;
|
|
||||||
|
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case WIDGET_INIT:
|
|
||||||
return MSG_HANDLED;
|
|
||||||
|
|
||||||
case WIDGET_KEY:
|
case WIDGET_KEY:
|
||||||
if (parm == XCTRL ('q')) {
|
if (parm == XCTRL ('q')) {
|
||||||
quote = 1;
|
quote = 1;
|
||||||
@ -1549,14 +1545,11 @@ input_callback (WInput *in, widget_msg_t msg, int parm)
|
|||||||
quote = 0;
|
quote = 0;
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
if (parm == KEY_UP || parm == KEY_DOWN || parm == ESC_CHAR
|
|
||||||
|| parm == KEY_F (10) || parm == XCTRL ('g'))
|
|
||||||
return MSG_NOT_HANDLED; /* We don't handle up/down */
|
|
||||||
|
|
||||||
if (parm == '\n') {
|
/* Keys we want others to handle */
|
||||||
dlg_one_down (h);
|
if (parm == KEY_UP || parm == KEY_DOWN || parm == ESC_CHAR
|
||||||
return MSG_HANDLED;
|
|| parm == KEY_F (10) || parm == XCTRL ('g') || parm == '\n')
|
||||||
}
|
return MSG_NOT_HANDLED;
|
||||||
|
|
||||||
/* When pasting multiline text, insert literal Enter */
|
/* When pasting multiline text, insert literal Enter */
|
||||||
if ((parm & ~KEY_M_MASK) == '\n') {
|
if ((parm & ~KEY_M_MASK) == '\n') {
|
||||||
@ -1572,7 +1565,7 @@ input_callback (WInput *in, widget_msg_t msg, int parm)
|
|||||||
case WIDGET_UNFOCUS:
|
case WIDGET_UNFOCUS:
|
||||||
case WIDGET_DRAW:
|
case WIDGET_DRAW:
|
||||||
update_input (in, 0);
|
update_input (in, 0);
|
||||||
return default_proc (msg, parm);
|
return MSG_HANDLED;
|
||||||
|
|
||||||
case WIDGET_CURSOR:
|
case WIDGET_CURSOR:
|
||||||
widget_move (&in->widget, 0, in->point - in->first_shown);
|
widget_move (&in->widget, 0, in->point - in->first_shown);
|
||||||
|
Loading…
Reference in New Issue
Block a user