wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

a new function like `get_lines_as_text()` which includes empty lines

Open naikrovek opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. get_lines_as_text() and get_logical_lines_as_text() do not get empty lines.

Sometimes I want to capture the window including empty lines, such as when I want to capture a TUI as-is. get_lines_as_text() and get_logical_lines_as_text() omit empty lines, and according to the documentation, this is by design.

Describe the solution you'd like A new function which does include empty lines.

Describe alternatives you've considered The only alternative I have is to manually edit the text captured by these methods to look like what I see on screen.

Additional context An option for the new method/function which optionally also includes textual formatting information (as inline formatting sequences exactly as the shell would receive them.)

Basically I want a "textual screenshot" of the window, without copying with the mouse.

naikrovek avatar Sep 06 '22 12:09 naikrovek

oh, by the way, if this feels like I'm making a demand, then I have misspoken. If this doesn't make sense for the application, don't do it. if you don't want to do this, don't do it. If I annoy you, don't do it. etc.

naikrovek avatar Sep 07 '22 01:09 naikrovek

https://wezfurlong.org/wezterm/config/lua/pane/get_text_from_region.html was recently added

wez avatar Mar 31 '23 05:03 wez

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar May 01 '23 03:05 github-actions[bot]