P2 selects how the terminal draws the background color.
P2 Meaning
0 or 2 (default) Pixel positions specified as 0 are set to the
current background color.
1 Pixel positions specified as 0 remain at their
current color.
Both modes are now supported.
Ref. https://www.vt100.net/docs/vt3xx-gp/chapter14.html
The general reasoning is that the vim browse patch is very invasive,
has a high level of complexity, and is incompatible with a significant
number of other patches and it complicates further maintenance.
Additionally the patch has its own scrollback mechanism which seemingly
did not work properly - and nobody seems to have complained about this
since the patch was added back in May 2021.
If you want to try out the vim browse patch then I would recommend having
a play around with the patch author's own build that has this patch
integrated:
- https://github.com/juliusHuelsmann/st-history-vim
- https://github.com/juliusHuelsmann/st
Alternatively a tag has been added to this repository that refers to the
last commit that still has the vim browse patch:
- https://github.com/bakkeby/st-flexipatch/tree/VIM_BROWSE_PATCH
* sixel: remove black bars from sixel images
When the images don't fully cover the text cells, black bars are added
to them. This fix removes those bars, but if you need the old behavior,
you can restore it by setting 'sixelremovebars' to zero in config.h
* sixel: fix a potential memory leak
* sixel: improve behavior with text reflow
* sixel: prevent animated gifs from choking the terminal
Animated gifs constantly spawn new images that eventually choke the
terminal because the old animation frames are kept in the image buffer.
This fix removes overlapping images from the image buffer and prevents
them from piling up.
* sixel: add zooming and clipping
* sixel: copying bulk of changes
* sixel: move sixel_parser_parse() and add missing sequences and blocks (#113)
- Move sixel_parser_parse() from tputc() to twrite()
- Add missing 8452, DECSDM, XTSMGRAPHICS and XTWINOPS sequences
- Add more conditional blocks for the scrollback and sync patches
- Remove unused reflow_y from ImageList. It is only used for the
scrollback-reflow patch in st-sx.
* sixel: update vtiden to VT200 family
* sixel: fix scrolling issues inside tmux (#114)
tmux is using the scrolling region and sequence to clear the screen
below the shell prompt. This peculiar behavior caused the tscrollup()
function to be called, which always scrolled the images regardless of
whether they were inside the region or not. So the images moved out of
place whenever the bottom of the screen was cleared. This fix checks
that the images are inside the region before scrolling them.
* sixel: prevent images from being deleted when resizing (#115)
This fixes resizing issues outside of tmux not inside.
* Rewriting tresize logic based on veltza's proposed implementation in PR #115
* tresize: correction for tscrollup call when scrollback patch is used
---------
Co-authored-by: veltza <106755522+veltza@users.noreply.github.com>
...support for transparency. Technically, the sixels do not have transparency,
but empty pixels are now rendered with the current background color instead
of black to make the them appear transparent. Same goes for the black bars.
The current background color makes them disappear.
There is one technical limitation with the alpha focus highlight patch.
The alpha value and background color is taken from the current background color,
so when the window is unfocused, images may have the wrong alpha and/or
background color. This can't be fixed easily.
Scrolling back and then entering keyboardselect's copy mode causes
glitched text to appear when moving the cursor. This is because the
keyboardselect patch is not aware of the scrollback history (term.hist),
so it takes the text from the last displayed screen (term.line).
Co-authored-by: Àlex Ramírez <aramirez@verbio.com>
This patch 1) improves reloading X resources - by considering fonts in
a way nearly identical to function `zoomabs`' - and 2) re-renders st so
that changed colors and fonts can be seen.
The openurlonclick and scrollback patches are now working together,
so links can be clicked in the scrollback buffer too. This update also
adds url underlining and other improvements to the openurlonclick patch.
The full list of changes in the openurlonclick patch:
- Adds scrollback support
- Adds modkey option
- Better url detection
- Underlines url when the mouse pointer is over a link
- Opens a browser as a background process, so it won't lock the terminal anymore
- Fixes a segmentation fault bug
There is a compatibility issue between the dwm swallow patch and the
newterm patch for st.
The swallow patch identifies the terminal client to substitute by
traversing the process tree checking if the new window is a descendant
of a terminal client.
The newterm patch for st spawns a new terminal that is a descendant of
the parent st process.
This can lead to situations where the swallow patch ends up replacing
the wrong terminal window.
Changed the forking mechanism to do a double fork and letting the
first one die. This is a technique commonly used by daemons to spawn
new orphan processes.
st could easily tear/flicker with animation or other unattended
output. This commit eliminates most of the tear/flicker.
Before this commit, the display timing had two "modes":
- Interactively, st was waiting fixed `1000/xfps` ms after forwarding
the kb/mouse event to the application and before drawing.
- Unattended, and specifically with animations, the draw frequency was
throttled to `actionfps`. Animation at a higher rate would throttle
and likely tear, and at lower rates it was tearing big frames
(specifically, when one `read` didn't get a full "frame").
The interactive behavior was decent, but it was impossible to get good
unattended-draw behavior even with carefully chosen configuration.
This commit changes the behavior such that it draws on idle instead of
using fixed latency/frequency. This means that it tries to draw only
when it's very likely that the application has completed its output
(or after some duration without idle), so it mostly succeeds to avoid
tear, flicker, and partial drawing.
The config values minlatency/maxlatency replace xfps/actionfps and
define the range which the algorithm is allowed to wait from the
initial draw-trigger until the actual draw. The range enables the
flexibility to choose when to draw - when least likely to flicker.
It also unifies the interactive and unattended behavior and config
values, which makes the code simpler as well - without sacrificing
latency during interactive use, because typically interactively idle
arrives very quickly, so the wait is typically minlatency.
While it only slighly improves interactive behavior, for animations
and other unattended-drawing it improves greatly, as it effectively
adapts to any [animation] output rate without tearing, throttling,
redundant drawing, or unnecessary delays (sounds impossible, but it
works).
This patch must be applied on the externalpipe patch. It adds the
function externalpipein to redirect the standard output of the external
command to the slave size of the pty, that is, as if the external
program had been manually executed on the terminal. It can be used to
send desired escape sequences to the terminal with a shortcut.
I created the patch to make use of the dynamic-colors program
(https://github.com/sos4nt/dynamic-colors) that uses the OSC escape
sequences to change the colors of the terminal. The program keeps the
last colorscheme selected in a file, so you can use it to select the
colorscheme for all newly opened terminals from that moment on. If you
want to change the color of the background and foreground independently
from the palette, you have to merge in the patch for the OSC escape
sequences 10, 11, and 12.
This patch includes the changes of the externalpipe sigaction patch to
prevent reseting the signal handler for SIGCHLD when the proces of the
external command exits.