bloomberg / memray

Memray is a memory profiler for Python
https://bloomberg.github.io/memray/
Apache License 2.0
13.17k stars 392 forks source link

Ctrl-Z in "memray tree" doesn't work #559

Closed kshpytsya closed 5 months ago

kshpytsya commented 6 months ago

Is there an existing issue for this?

Current Behavior

It is impossible to use Ctrl-Z to background the "memray tree" TUI.

Expected Behavior

I would like to be able to use the standard Ctrl-Z to send memray's TUI to background.

Steps To Reproduce

  1. Obtain some memray tracker run results
  2. Run memray tree <file> in terminal
  3. Press Ctrl-Z

Actual behavior: Ctrl-Z press is ignored. Expected behavior: memray's TUI is sent to background and I see shell prompt.

Memray Version

1.11.0

Python Version

3.8, 3.11

Operating System

Linux

Anything else?

No response

pablogsal commented 6 months ago

Thanks for reporting this issue @kshpytsya!

We don't do anything special here so you may need to report this to https://github.com/Textualize/textual unless @willmcgugan confirms that the problem is on our side (maybe we are using textual in some incorrect way).

willmcgugan commented 6 months ago

ctrl+z to suspend isn't enabled by default, but you can add it with a keybinding.

This is relatively new, so likely didn't exist when you built your TUI.