wezterm
wezterm copied to clipboard
Last line of semantic zone output not being returned in pane:get_text_from_semantic_zone(zone)
What Operating System(s) are you seeing this problem on?
macOS
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
20240405-180910-cce0706b
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
Last line of semantic zone output not being returned in pane:get_text_from_semantic_zone(zone)
. Rest of the content is present.
Enabled shell integration and tried in both zsh and fish.
Tried running the following command:
Obtained output (from logs):
01:01:57.041 INFO logging > lua: total 0
drwxr-xr-x 2 unbxd staff 64B Apr 28 00:40 another_dir
drwxr-xr-x 2 unbxd staff 64B Apr 28 00:41 another_dir_2
drwxr-xr-x 2 unbxd staff 64B Apr 28 00:38 dir1
-rw-r--r-- 1 unbxd staff 0B Apr 28 00:38 file1
To Reproduce
Enable shell integration in zsh/fish. Add below config and try out
Configuration
{
key = 'v',
action = wezterm.action_callback(function(window, pane)
local output_semantic_zones = pane:get_semantic_zones("Output")
if #output_semantic_zones > 0 then
local output_content
for i = 1, #output_semantic_zones, 1 do
output_content = pane:get_text_from_semantic_zone(output_semantic_zones[i])
wezterm.log_info(output_content)
end
end
end)
}
Expected Behavior
Expected output should include last line as well.
Logs
01:01:57.041 INFO logging > lua: total 0
drwxr-xr-x 2 unbxd staff 64B Apr 28 00:40 another_dir
drwxr-xr-x 2 unbxd staff 64B Apr 28 00:41 another_dir_2
drwxr-xr-x 2 unbxd staff 64B Apr 28 00:38 dir1
-rw-r--r-- 1 unbxd staff 0B Apr 28 00:38 file1
Anything else?
No response