* usr/lib/byobu/include/select-session.py: LP: #1583590

- fix default window selection by just hitting enter
This commit is contained in:
Dustin Kirkland 2016-07-29 11:40:29 -05:00
commit b841fa0e38
2 changed files with 11 additions and 2 deletions

2
debian/changelog vendored
View file

@ -12,6 +12,8 @@ byobu (5.110) unreleased; urgency=medium
and virtual kernels
* usr/bin/purge-old-kernels: LP: #1532153
- run autoremove afterwards, to clean up anything else
* usr/lib/byobu/include/select-session.py: LP: #1583590
- fix default window selection by just hitting enter
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 05 Jul 2016 10:47:25 -0500

View file

@ -154,9 +154,16 @@ if len(sessions) > 1:
i += 1
try:
try:
choice = int(input("\nChoose 1-%d [1]: " % (i - 1)))
user_input = input("\nChoose 1-%d [1]: " % (i - 1))
except:
choice = int(eval(input("\nChoose 1-%d [1]: " % (i - 1))))
user_input = ""
if not user_input or user_input == "":
choice = 1
break
try:
choice = int(user_input)
except:
choice = int(eval(user_input))
if choice >= 1 and choice < i:
break
else: