Open mgpinf opened 5 months ago
As a workaround, I've been using the following function ever since:
local function my_fixed_get_text_from_semantic_zone(pane, zone)
-- Unfortunately, the function `get_text_from_semantic_zone(zone)` swallows the last line.
-- So we need to get the region up to column 0 of the line that follows the zone.
return pane:get_text_from_region(zone.start_x, zone.start_y, 0, zone.end_y + 1)
end
Then, you can call:
output_content = my_fixed_get_text_from_semantic_zone(pane, output_semantic_zones[i])
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):
To Reproduce
Enable shell integration in zsh/fish. Add below config and try out
Configuration
Expected Behavior
Expected output should include last line as well.
Logs
Anything else?
No response