nicm
a2a02fd7d7
Change a few types to fix warnings, from Thomas Klausner.
2023-06-30 21:55:08 +00:00
tb
204d8f31d7
Reorder struct grid_cell_entry
...
On aarch64 with llvm 15, the new -Wunaligned-access emits noise on every
one of tmux's source files. This avoids this warning by moving a u_char
to the end of the struct. This does not change the size of the struct on
any architecture.
ok nicm
2023-05-08 10:03:39 +00:00
nicm
9cc8e40aa0
Add a -T flag to capture-pane to stop at the last used cell instead of
...
the full width. Restore the previous behaviour by making it default to
off unless -J is used (the only time it matters). Fixes mosh unit tests;
GitHub issue 3339.
2022-09-28 07:55:29 +00:00
nicm
d0d2c39dec
Support hyperlinks with capture-pane -e and add a mouse_hyperlink
...
format, GitHub issue 3247 from Jeff Chiang.
2022-07-06 07:36:36 +00:00
nicm
cdacc12ce3
Add support for OSC 8 hyperlinks (a VTE extension now supported by other
...
terminals such as iTerm2). Originally written by me then extended and
completed by first Will Noble and later Jeff Chiang. GitHub issues 911,
2621, 2890, 3240.
2022-06-30 09:55:53 +00:00
nicm
9c89f7c2af
Store time lines are scrolled into history and display in copy mode.
2022-06-21 09:30:01 +00:00
nicm
ded695504f
Capture up to used size not available size for each line.
2022-03-30 07:05:26 +00:00
nicm
9aad945f7e
Support underscore style with capture-pane -e, GitHub issue 2928.
2021-12-21 14:57:28 +00:00
nicm
3dddc11603
Send Unicode directional isolate characters around horizontal pane
...
borders if the terminal support UTF-8 and an extension terminfo(5)
capability "Bidi" is present. On terminals with BiDi support (ie, VTE)
this seems to be enough to display right-to-left text acceptably enough
to be usable (with some caveats about the mouse position). Requested by
and with help from Mahmoud Elagdar in GitHub issue 2425.
2021-02-05 12:29:18 +00:00
nicm
91d112bf12
There is no need to clear every line entirely before drawing to it, this
...
means moving the cursor and messes up wrapping. Better to just clear the
sections that aren't written over. GitHub issue 2537.
2021-01-18 10:27:54 +00:00
nicm
212c0c1f72
Do not force line width to grid width because it may need to be larger
...
to accomodate a wide character. GitHub issue 2336.
2020-08-07 07:02:57 +00:00
nicm
03b2998abe
Do not take the address of a potentially unaligned member.
2020-06-05 09:35:41 +00:00
nicm
d9cd493d09
Reset wrapped flag when clearing or moving lines, GitHub issue 2215.
2020-06-04 21:41:31 +00:00
nicm
4694e9a2b6
Move the code to set up a padding cell into grid.c.
2020-06-02 20:51:46 +00:00
nicm
2a4d4bda2b
Allow UTF-8 characters of width 0 to be stored, it is useful to be able
...
to put padding cells in as width 0.
2020-06-02 20:10:23 +00:00
nicm
f336599a3a
Make padding cell a valid character.
2020-05-27 06:23:23 +00:00
nicm
370f0bb98d
Remove leftover debug logging and fix comparison.
2020-05-26 08:56:48 +00:00
nicm
6f03e49e68
Use the internal representation for UTF-8 keys instead of wchar_t and
...
drop some code only needed for that.
2020-05-25 18:57:24 +00:00
nicm
49ec074271
Tidy up new UTF-8 code and make it more generic.
2020-05-25 18:19:29 +00:00
nicm
3a5219c6d0
Instead of storing all UTF-8 characters in the extended cell which means
...
that 14 bytes are wasted for each character in the BMP, only store
characters of three bytes or less in the cell itself and store others
(outside the BMP or with combining characters) in a separate global
tree. Can reduce grid memory use for heavy Unicode users by around 30%.
2020-05-25 09:32:10 +00:00
nicm
ecbdcc256f
Add screen write flags instead of individual bits and fix line length
...
calculation with padding.
2020-05-16 16:22:01 +00:00
nicm
6ea6d46d0a
Store and restore cursor position when copy mode is resized, from
...
Anindya Mukherjee.
2020-05-16 15:49:20 +00:00
nicm
5bf96c2f2c
Use a grid cell not a style for the pane style.
2020-05-16 14:53:23 +00:00
nicm
c7883d5c87
Use grid_empty_line rather than memset when adding new lines on resize.
...
Also remove some old test code.
2020-04-15 12:59:20 +00:00
nicm
315961faec
Some more, and use of wp->window before wp NULL check in format.c.
2020-04-09 13:53:50 +00:00
nicm
e6cddcf752
Add a -T flag to resize-pane to trim lines below the cursor, moving
...
lines out of the history. GitHub issue 2134.
2020-03-31 17:13:20 +00:00
nicm
edca27ae45
AIX colours are always stored as 90-97, not 100-107. From Johannes
...
Altmanninger.
2020-03-21 13:51:30 +00:00
nicm
ce61bf931b
Do not set the history flag if there is no history.
2020-03-19 13:46:10 +00:00
nicm
7826d40ff9
Style nits in function arguments.
2019-12-03 10:47:22 +00:00
nicm
e3359f8349
Some minor performance improvements - most notably, don't search the
...
input state table if the next character matches the same state as before.
2019-09-24 20:44:58 +00:00
nicm
58bbce09e2
Remove check for same size - size has already been changed so this
...
breaks reflow.
2019-08-01 07:08:13 +00:00
nicm
b89f2f28bb
Fix grid clear code to correctly clear with the default background
...
colour rather than ending up with the used count higher than the total
size, GitHub issue 1829.
2019-07-16 10:30:56 +00:00
nicm
3635b3cd6c
Correctly clear underscore colour in grid_get_cell1, also fix struct
...
grid_cell to avoid padding. Fixes increased memory use reported by Suraj
N Kurapati.
2019-07-06 20:37:29 +00:00
nicm
dae2868d12
Add support for underscore colours with Setulc capability, mostly from
...
Kai Moschcau.
2019-06-27 15:17:41 +00:00
nicm
e90d4a6021
Add formats for word and line under the mouse and use them to add some
...
items to the pane menu.
2019-05-26 17:34:45 +00:00
nicm
1ee944a19d
Add support for overline (SGR 53), from Ricardo Banffy.
2019-05-13 20:10:23 +00:00
nicm
ffa4d48967
Store and restore cursor across reflow by working out a position based
...
on unwrapped lines, rather than a grid offset. Fixes problems reported
by Thomas Sattler and Paul de Weerd.
2019-04-02 08:45:32 +00:00
nicm
792fcb1dbf
Restore a check to stop scrolled lines becoming larger than total lines,
...
fixes a crash reported by Thomas Sattler.
2019-04-01 19:33:38 +00:00
nicm
9ee1a8f701
Improve cursor positioning after reflow by storing the position as an
...
offset into the entire history before reflow and restoring it aftewards.
2019-03-20 19:19:11 +00:00
nicm
d738d51688
Mode init needs to be fired with the mode on the list or it will not be
...
resized correctly.
2019-03-18 15:25:36 +00:00
nicm
b2bc34af12
Set a flag on cells are genuinely empty (cleared and never written to)
...
and use tty_clear_line (which will choose the best escape sequence) to
clear any batches of cells with that flag when redrawing a line from the
stored screen.
2019-03-12 23:21:45 +00:00
nicm
fc41bf46ac
Add a "terminal" colour which can be used instead of "default" in style
...
options for the terminal default colour, bypassing any inheritance from
other options. Prompted by a discussion with abieber@.
2018-10-25 15:13:38 +00:00
nicm
bc0e527f32
Support for extended underline styles on terminals which offer them,
...
enabled by adding the Smulx capability with terminal-overrides (add
something like ',vte*:Smulx=\E[4\:%p1%dm'). GitHub issue 1492.
2018-10-18 07:57:57 +00:00
nicm
e7d53020b4
Helper function to shorten history.
2018-07-11 06:51:39 +00:00
nicm
03519021b9
Add function comments.
2018-07-11 06:43:45 +00:00
nicm
2fae6a5761
Add accessors for grid linedata member, for some future work. From Dan
...
Aloni.
2018-07-04 09:44:07 +00:00
nicm
d0c992306d
Fix some compiler warnings; from Thomas Adam.
2018-06-11 11:14:10 +00:00
nicm
ba31d3a88c
Increment the lines counter when skipping a line to avoid an infinite
...
loop, and fix a check to avoid a potential out-of-bounds access. Problem
reported by Yuxiang Qin and tracked down by Karl Beldan; GitHub issue
1352.
Also a man page fix request by jmc@.
2018-06-03 10:17:30 +00:00
nicm
2595718dd3
Include source function name in grid_check_y logging.
2018-04-18 14:31:42 +00:00
nicm
320abba341
Reflowing the grid in-place involved way too much memmove() for a big
...
performance cost with a large history. Instead change back to using a
second grid and copying modified lines over which is much faster (this
doesn't revert to the old code however which didn't support UTF-8
properly). GitHub issue 1249.
2018-02-16 09:51:41 +00:00