summaryrefslogtreecommitdiffstats
path: root/grid.c
AgeCommit message (Collapse)Author
2020-10-06glibc's malloc is very bad about returning memory from the kernel, add a callNicholas Marriott
to its malloc_trim to prompt it to do so. Reported by Sarunas Valaskevicius.
2020-08-07Do not force line width to grid width because it may need to be largernicm
to accomodate a wide character. GitHub issue 2336.
2020-06-05Do not take the address of a potentially unaligned member.nicm
2020-06-04Reset wrapped flag when clearing or moving lines, GitHub issue 2215.nicm
2020-06-02Move the code to set up a padding cell into grid.c.nicm
2020-06-02Allow UTF-8 characters of width 0 to be stored, it is useful to be ablenicm
to put padding cells in as width 0.
2020-05-27Make padding cell a valid character.nicm
2020-05-26Remove leftover debug logging and fix comparison.nicm
2020-05-25Use the internal representation for UTF-8 keys instead of wchar_t andnicm
drop some code only needed for that.
2020-05-25Tidy up new UTF-8 code and make it more generic.nicm
2020-05-25Instead of storing all UTF-8 characters in the extended cell which meansnicm
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-16Add screen write flags instead of individual bits and fix line lengthnicm
calculation with padding.
2020-05-16Store and restore cursor position when copy mode is resized, fromnicm
Anindya Mukherjee.
2020-05-16Use a grid cell not a style for the pane style.nicm
2020-04-15Use grid_empty_line rather than memset when adding new lines on resize.nicm
Also remove some old test code.
2020-04-09Some more, and use of wp->window before wp NULL check in format.c.nicm
2020-03-31Add a -T flag to resize-pane to trim lines below the cursor, movingnicm
lines out of the history. GitHub issue 2134.
2020-03-21AIX colours are always stored as 90-97, not 100-107. From Johannesnicm
Altmanninger.
2020-03-19Do not set the history flag if there is no history.nicm
2019-12-03Style nits in function arguments.nicm
2019-09-24Some minor performance improvements - most notably, don't search thenicm
input state table if the next character matches the same state as before.
2019-08-01Remove check for same size - size has already been changed so thisnicm
breaks reflow.
2019-07-16Fix grid clear code to correctly clear with the default backgroundnicm
colour rather than ending up with the used count higher than the total size, GitHub issue 1829.
2019-07-06Correctly clear underscore colour in grid_get_cell1, also fix structnicm
grid_cell to avoid padding. Fixes increased memory use reported by Suraj N Kurapati.
2019-06-27Add support for underscore colours with Setulc capability, mostly fromnicm
Kai Moschcau.
2019-05-26Add formats for word and line under the mouse and use them to add somenicm
items to the pane menu.
2019-05-13Add support for overline (SGR 53), from Ricardo Banffy.nicm
2019-04-02Store and restore cursor across reflow by working out a position basednicm
on unwrapped lines, rather than a grid offset. Fixes problems reported by Thomas Sattler and Paul de Weerd.
2019-04-01Restore a check to stop scrolled lines becoming larger than total lines,nicm
fixes a crash reported by Thomas Sattler.
2019-03-20Improve cursor positioning after reflow by storing the position as annicm
offset into the entire history before reflow and restoring it aftewards.
2019-03-18Mode init needs to be fired with the mode on the list or it will not benicm
resized correctly.
2019-03-12Set a flag on cells are genuinely empty (cleared and never written to)nicm
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.
2018-10-25Add a "terminal" colour which can be used instead of "default" in stylenicm
options for the terminal default colour, bypassing any inheritance from other options. Prompted by a discussion with abieber@.
2018-10-18Support for extended underline styles on terminals which offer them,nicm
enabled by adding the Smulx capability with terminal-overrides (add something like ',vte*:Smulx=\E[4\:%p1%dm'). GitHub issue 1492.
2018-07-11Helper function to shorten history.nicm
2018-07-11Add function comments.nicm
2018-07-04Add accessors for grid linedata member, for some future work. From Dannicm
Aloni.
2018-06-11Fix some compiler warnings; from Thomas Adam.nicm
2018-06-03Increment the lines counter when skipping a line to avoid an infinitenicm
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-04-18Include source function name in grid_check_y logging.nicm
2018-02-16Reflowing the grid in-place involved way too much memmove() for a bignicm
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.
2017-11-15Completely rewrite the reflow code to correctly handle double widthnicm
characters (previously they were not accounted for).
2017-11-03Support mouse on preview in tree mode.nicm
2017-09-11Do not free more lines than are available in the history.nicm
2017-09-10Previously, extended cell data was never reduced in size even when thenicm
cell was overwritten. With a large history this can be a substantial amount of memory. To reduce this, compact each extended cell list to only cells in use as it is scrolled off the visible screen into the history. From Dan Aloni in GitHub issue 1062.
2017-08-30Instead of overloading the line clear function to mean free ifnicm
background is default (8), introduce an explicit free function and use it where a free alone is needed. Likewise, use memmove directly rather than grid_move_lines where it makes sense. Based on a memory leak fix by Dan Aloni in GitHub issue 1051.
2017-05-16Line length and spaces to tabs.nicm
2017-05-13Some other unused variables.nicm
2017-05-12When expanding a line in order to clear it, we need to use the defaultnicm
background colour - there may be portions that we do not want to clear with the new background colour.
2017-05-12Scrolling needs to use background colour.nicm