diff options
author | 2014-08-14 12:22:58 +0000 | |
---|---|---|
committer | 2014-08-14 12:22:58 +0000 | |
commit | e1a7f14f0011c6e35319249b62e1a9fa2cda850f (patch) | |
tree | bf1909b13389d97e57093af5175e7c8f26b9051c | |
parent | Compare number of allocated clusters with a low watermark, not (diff) | |
download | wireguard-openbsd-e1a7f14f0011c6e35319249b62e1a9fa2cda850f.tar.xz wireguard-openbsd-e1a7f14f0011c6e35319249b62e1a9fa2cda850f.zip |
Add bounce matching for [] and {} like mg already does with () and like
Emacs does.
ok florian@
-rw-r--r-- | usr.bin/mg/keymap.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/usr.bin/mg/keymap.c b/usr.bin/mg/keymap.c index bd5cff15d4e..8d52ada1da7 100644 --- a/usr.bin/mg/keymap.c +++ b/usr.bin/mg/keymap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keymap.c,v 1.51 2013/05/22 19:23:45 lum Exp $ */ +/* $OpenBSD: keymap.c,v 1.52 2014/08/14 12:22:58 bcallah Exp $ */ /* This file is in the public domain. */ @@ -388,16 +388,16 @@ static PF fund_del[] = { }; static PF fund_cb[] = { - showmatch /* ) */ + showmatch /* ) ] } */ }; #ifndef FUND_XMAPS #define NFUND_XMAPS 0 /* extra map sections after normal ones */ #endif -static struct KEYMAPE (6 + NFUND_XMAPS + IMAPEXT) fundmap = { - 6 + NFUND_XMAPS, - 6 + NFUND_XMAPS + IMAPEXT, +static struct KEYMAPE (8 + NFUND_XMAPS + IMAPEXT) fundmap = { + 8 + NFUND_XMAPS, + 8 + NFUND_XMAPS + IMAPEXT, selfinsert, { { @@ -416,6 +416,12 @@ static struct KEYMAPE (6 + NFUND_XMAPS + IMAPEXT) fundmap = { ')', ')', fund_cb, NULL }, { + ']', ']', fund_cb, NULL + }, + { + '}', '}', fund_cb, NULL + }, + { CCHR('?'), CCHR('?'), fund_del, NULL }, #ifdef FUND_XMAPS |