Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable j/k navigation in the RHS sidebar panels #196

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pudb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

from __future__ import absolute_import, division, print_function

NUM_VERSION = (2016, 2)
NUM_VERSION = (2016, 2, 'amesha')
VERSION = ".".join(str(nv) for nv in NUM_VERSION)
__version__ = VERSION

Expand Down
4 changes: 4 additions & 0 deletions pudb/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
import sys
import os

from urwid.command_map import command_map
command_map['j'] = 'cursor down'
command_map['k'] = 'cursor up'

from pudb.settings import load_config, save_config
CONFIG = load_config()
save_config(CONFIG)
Expand Down
15 changes: 15 additions & 0 deletions pudb/ui_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def keypress(self, size, key):
return key


import xtraceback; xtraceback.compat.install()
class SignalWrap(urwid.WidgetWrap):
def __init__(self, w, is_preemptive=False):
urwid.WidgetWrap.__init__(self, w)
Expand All @@ -84,6 +85,20 @@ def listen(self, mask, handler):
self.event_listeners.append((mask, handler))

def keypress(self, size, key):
# with open('/home/adam/tmp/keypress', 'a') as fp:
# if 1 or (key == 'down' and 0 in size):
# import traceback; traceback.print_stack(file=fp)
# fp.write('self: {!r}, w: {!r}, '
# 'size: {!r}, key: {!r}\n\n'.format(
# self, self._w, size, key))
# fp.write(repr(dir(self._w)) + '\n')
# fp.write(repr(self._w.contents)+'\n\n--------------------------------------------------------------------------------\n')
# # if 0 in size:
# # fp.write('\nsomething\n\n\n')
# # else:
# # fp.write('\nnothing here\n\n\n')


result = key

if self.is_preemptive:
Expand Down