Ticket #3557 (closed defect: fixed)
Editor should not be closed on Ctrl-G
Reported by: | normadize | Owned by: | andrew_b |
---|---|---|---|
Priority: | major | Milestone: | 4.8.16 |
Component: | mcedit | Version: | 4.8.11 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master |
Description
There was an older bug https://www.midnight-commander.org/ticket/2520 which pointed out that the file panels were closed on Ctrl-G and that was fixed.
The editor still gets killed on Ctrl-G. Not sure if that was intentional, but it would be preferable it wasn't killed on Ctrl-G.
Attachments
Change History
comment:1 follow-up: ↓ 3 Changed 9 years ago by and
Thanks for reporting, normadize.
Patch attached for review.
comment:4 Changed 9 years ago by normadize
Thanks for the patch. I can't test it right now as I don't have my dev tools installed. I would like to be able to assign Ctrl-G to any action in the editor via mc.keymap ... I wouldn't want it to force any action. A default action that can be changed in mc.keymap would be fine though.
comment:5 in reply to: ↑ 3 ; follow-up: ↓ 6 Changed 9 years ago by and
Replying to andrew_b:
Replying to and:
Patch attached for review.
Should Ctrl-G cancel move/resize of window?
I was comparing viewer and editor reaction when hitting ctrl-g
viewer don't exit and editor exit, so looks like a valid bug to me (too).
root cause should be this, I think:
/* use Ctrl-g to generate SIGINT */ cur_term->Nttyb.c_cc[VINTR] = CTRL ('g'); /* ^g */
comment:6 in reply to: ↑ 5 Changed 9 years ago by andrew_b
Replying to and:
root cause should be this, I think:
/* use Ctrl-g to generate SIGINT */ cur_term->Nttyb.c_cc[VINTR] = CTRL ('g'); /* ^g */
This Ctrl-G is actual for code between tty_enable_interrupt_key() and tty_disable_interrupt_key() calls. For other cases, Ctrl-G binded via mc.keymap is used.
comment:7 Changed 9 years ago by zaytsev
Sorry, so what was the conclusion regarding this ticket? Is the attached patch the right solution? Do we want this behavior?
comment:8 Changed 9 years ago by andrew_b
- Status changed from new to accepted
- Owner set to andrew_b
- Component changed from mc-core to mcedit
- Branch state changed from no branch to on review
Branch: 3557_editor_not_close_ctrlg
changeset:0d3be9f90350ee3f23ca2f37a5a2f0db6b336dcc
comment:10 Changed 9 years ago by andrew_b
- Votes for changeset changed from zaytsev to zaytsev andrew_b
- Branch state changed from on review to approved
comment:11 Changed 9 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from zaytsev andrew_b to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged
Merged to master: [9a617a6d5a72142ef1d6c24ed40f44bd70cef82c].