Closed andrei-a-papou closed 5 months ago
I made the check for xterm a bit more generic and added a configuration option for the curses timeout. It defaults to 200ms, so you might want to update your configuration file, I assume based on the 100ms you used in the patch :)
I made the check for xterm a bit more generic and added a configuration option for the curses timeout.
Awesome!
I made the check for xterm a bit more generic
Yes, good idea, since pter also supports terminals with no color. I forgot about that.
I've pulled the latest changes and re-built the Docker image. With esc-timeout
still unset in the config, pter errors out:
[CRITICAL] Pter crashed with exception: 'int' object has no attribute 'isnumeric'
File "/usr/local/lib/python3.11/dist-packages/pter-3.15.2.dev0-py3.11.egg/pter/curses.py", line 3119, in run_cursesui
window.run()
File "/usr/local/lib/python3.11/dist-packages/cursedspace-1.5.2-py3.11.egg/cursedspace/application.py", line 59, in run
raise exception
File "/usr/local/lib/python3.11/dist-packages/cursedspace-1.5.2-py3.11.egg/cursedspace/application.py", line 52, in run
self.main()
File "/usr/local/lib/python3.11/dist-packages/pter-3.15.2.dev0-py3.11.egg/pter/curses.py", line 1655, in main
curses.set_escdelay(self.conf.number(common.SETTING_GROUP_GENERAL,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/pter-3.15.2.dev0-py3.11.egg/pter/configuration.py", line 152, in number
if value.isnumeric():
^^^^^^^^^^^^^^^
When esc-timeout
is set, the crash goes away.
Yeah, should not have pushed that change 5 minutes before falling asleep, I suppose. It’s fixed!
Works great, thank you!
I've been using this patch to enable two "standard" bash-like bindings in pter --
Alt + d
fordel-word-right
andAlt + Backspace
fordel-word-left
.For now these are treated specially, in the future perhaps pter could have full
Alt
-based bindings support. However, they are trickier thanCtrl
-based ones, so for me just these two are enough. Plus we already have chain-based bindings, so no prob.91-alt-backspace-alt-d.diff.gz
In addition, I've adjusted the patch from #36 to check if we're running under
xterm-256color
. The values for Ctrl + arrows/Delete seem to be specific to that terminfo config. (Alt-based ones from above seem to work with other terminfo configurations, such asscreen-256color
.)30-ctrl-combos-should-be-conditional.diff.gz