From 93d22093439bfa56e605285c3d49c41577ba1bf4 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 26 Oct 2011 15:02:04 +0200 Subject: [PATCH] [ Daniel Hahler ] * usr/lib/menu: - Fix extraction of escape key for screen-escape-keys keybindings, LP: #881993 --- debian/changelog | 7 +++++-- usr/lib/byobu/menu | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index cfe11907..6b363c5c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,11 @@ byobu (4.44) unreleased; urgency=low - * UNRELEASED + [ Daniel Hahler ] + * usr/lib/menu: + - Fix extraction of escape key for screen-escape-keys keybindings, + LP: #881993 - -- Dustin Kirkland Sat, 22 Oct 2011 03:21:46 -0500 + -- Daniel Hahler Wed, 26 Oct 2011 14:58:03 +0200 byobu (4.43-0ubuntu1) precise; urgency=low diff --git a/usr/lib/byobu/menu b/usr/lib/byobu/menu index 5cbf0f9b..dba17b71 100755 --- a/usr/lib/byobu/menu +++ b/usr/lib/byobu/menu @@ -27,7 +27,9 @@ __menu() { local bindings esc key text [ -r "$BYOBU_CONFIG_DIR/keybindings" ] && bindings="$BYOBU_CONFIG_DIR/keybindings" || bindings="$HOME/.screenrc" if grep -qs "^source.*screen-escape-keys$" $bindings 2>/dev/null || [ "$1" = "--disable-f-keys" ]; then - esc=`grep "^escape" $bindings | $SED "s/^.*\(.\)$/\1/"` + esc=`grep "^escape" $bindings` + # Get the second to last byte from the "escape" option + [ -n "$esc" ] && esc=`expr substr "$esc" $(expr ${#esc} - 1) 1` [ -n "$esc" ] && key="^$esc-@" || key="^a-@" elif grep -qs "^source.*none$" $bindings 2>/dev/null; then key="byobu-config"