-
Notifications
You must be signed in to change notification settings - Fork 63
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
Almost there, blocked by Terminal errors in ListBoxes #71
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes incorrect keypress handling
urwid/urwid#95 is fixed now, waiting on a new urwid release to update requirements.txt |
Adds numbered list handling
Thanks to some prodding from new users (thanks @lanox!), I looked into the current state of things again and found that this is good to go! |
I test it in your pull request , not work in python 3.9, am I something wrong?(py39) [root@host177 tui_urwind_demo]# pip uninstall urwid -y
Found existing installation: urwid 2.1.1.dev0
Uninstalling urwid-2.1.1.dev0:
Successfully uninstalled urwid-2.1.1.dev0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
(py39) [root@host177 tui_urwind_demo]# cd pull/urwid/
(py39) [root@host177 urwid]# pip install -e .
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Obtaining file:///mnt/smbshare/code/mine/tui_urwind_demo/pull/urwid
Preparing metadata (setup.py) ... done
Installing collected packages: urwid
Running setup.py develop for urwid
Successfully installed urwid-2.1.1.dev0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
(py39) [root@host177 urwid]# python ../../src/tt.py
Traceback (most recent call last):
File "/mnt/smbshare/code/mine/tui_urwind_demo/pull/urwid/../../src/tt.py", line 8, in <module>
loop.run()
File "/mnt/smbshare/code/mine/tui_urwind_demo/pull/urwid/urwid/main_loop.py", line 287, in run
self._run()
File "/mnt/smbshare/code/mine/tui_urwind_demo/pull/urwid/urwid/main_loop.py", line 385, in _run
self.event_loop.run()
File "/mnt/smbshare/code/mine/tui_urwind_demo/pull/urwid/urwid/main_loop.py", line 790, in run
self._loop()
File "/mnt/smbshare/code/mine/tui_urwind_demo/pull/urwid/urwid/main_loop.py", line 818, in _loop
self._entering_idle()
File "/mnt/smbshare/code/mine/tui_urwind_demo/pull/urwid/urwid/main_loop.py", line 779, in _entering_idle
callback()
File "/mnt/smbshare/code/mine/tui_urwind_demo/pull/urwid/urwid/main_loop.py", line 574, in entering_idle
self.draw_screen()
File "/mnt/smbshare/code/mine/tui_urwind_demo/pull/urwid/urwid/main_loop.py", line 588, in draw_screen
canvas = self._topmost_widget.render(self.screen_size, focus=True)
File "/mnt/smbshare/code/mine/tui_urwind_demo/pull/urwid/urwid/widget.py", line 145, in cached_render
canv = fn(self, size, focus=focus)
File "/mnt/smbshare/code/mine/tui_urwind_demo/pull/urwid/urwid/listbox.py", line 451, in render
raise ListBoxError("Focus Widget %r at position %r within listbox calculated cursor coords %r but rendered cursor coords %r!" %(focus_widget,focus_pos,cursor,c_cursor))
urwid.listbox.ListBoxError: Focus Widget <BoxAdapter selectable flow widget <Terminal selectable box widget> height=20> at position 0 within listbox calculated cursor coords (0, 0) but rendered cursor coords (0, 2)!
(py39) [root@host177 urwid]# git branch -a
* (HEAD detached at origin/hotfix/95-vterm_in_listbox)
(py39) [root@host177 urwid]# cat ../../src/tt.py
import urwid
container = urwid.ListBox([
urwid.BoxAdapter(urwid.Terminal(["ping", '192.168.1.1']), 20),
])
loop = urwid.MainLoop(container) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #29 , further development blocked by urwid/urwid#95