| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A top-level font now has a list of fallback fonts. When a glyph cannot
be found, we try each fallback font in turn, until we either find one
that has the glyph, or until we've exhausted the list.
To make this actually work in practise (read: to make performance
acceptable), the cache is re-worked and is now populated on demand.
It also supports non-ASCII characters, by using the 4-byte unicode
character as index instead.
Since having an array that can be indexed by a 4-byte value isn't
really viable, we now have a simple hash table instead of an array.
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch takes a bit from the foreground color value in a
cell (todo: split up foreground/background into bitfields with a
separate field for 'foreground/background' has been set), and only
re-renders cells that aren't marked as clean.
Note: we use a 'clean' bit rather than a 'dirty' bit to make it easy
to erase cells - we can (keep doing) do that by simply memsetting a
cell range to 0.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This function fills in a struct glyph with glyph bitmap data for the
provided utf-8 character (essentially a FT_Bitmap wrapped in a cairo
surface).
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This improves the scroll experience with certain devices
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default is to reverse the foreground/background colors in the cell
with the cursor.
But, if the user configures a specific set of cursor colors, those
will always be used, regardless of other cell attributes (dim, reverse
etc).
The cursor color is specified as two color values, 'text' and
'cursor'.
The block cursor uses the 'cursor' color as background, and the 'text'
color for the glyph.
All other cursor styles uses the 'cursor' color for the cursor, but
uses the cell's foreground color for the glyph (meaning,
dim/reverse/etc applies).
|
| | |
|
| |
|
|
|
|
|
|
| |
According to the specs, \E[0 q means a blinking block cursor. However,
since it also states that \E[1 q *also* is a blinking block cursor,
and that it is the default, *and* given that fact that parameter-less
CSIs typically means "reset", let's make it mean "reset to the user
configured cursor style".
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Use our own escape sequence for the 'flash' terminfo entry.
Implemented by arming a timer FD and setting a boolean that indicates
we're currently "flashing".
The renderer draws a semi-transparent yellowish layer over the entire
window when "flashing" is active.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
22;0|1|2t pushes the current window title/icon to the stack, while 23
pops it.
The second parameter, 0|1|2 has the following meaning:
0 - push/pop icon+title
1 - push/pop icon
2 - push/pop title
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
We need this for clipboard data
|
| | |
|
| |
|
|
|
|
|
| |
We now store the passthrough characters in a buffer, and call
dcs_passthrough() on unhook.
However, dcs_passthrough() doesn't do anything.
|
| | |
|
| |
|
|
|
|
|
|
| |
To avoid having to re-generate glyphs, cache the glyphs.
For now, we only cache ASCII characters, as this allows us to lookup
the cache by simply indexing with the character (into a 256-entry
array).
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This reduces the cell size, and thus improves the cache behavour
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
* Start selection on mouse button down
* Update selection on motion
* Button release cancels selection if there were no motion after start
* Renderer detects cells inside the selection and inverts their colors
|
| |
|
|
|
| |
We don't need the full resolution a double gives us. Using floats
reduces the size of cells greatly, which improves cache usage.
|
| |
|
|
|
|
| |
We don't *have* to NULL-terminate the utf8 string. So don't. This
makes the cell glyph 4 bytes exactly, which is better for alignment
and cache usage.
|
| |
|
|
|
| |
This makes the other attribute bits fit in a single uint8_t, which
makes each cell smaller which improves cache usage.
|
| |
|
|
|
|
|
|
|
|
| |
The row array may now contain NULL pointers. This means the
corresponding row hasn't yet been allocated and initialized.
On a resize, we explicitly allocate the visible rows.
Uninitialized rows are then allocated the first time they are
referenced.
|
| |
|
|
|
|
|
|
| |
linefeed moves cursor down one row (columns stays the same), or, if
the cursor is at the last row, scrolls up one row.
reverse_index does the opposite; it moves the cursor *up* one row, or,
if the cursor is at the top row, scrolls *down* one row.
|
| | |
|
| |
|
|
|
| |
This ensures everything *visible* (i.e. maybe scrolled back content)
is re-rendered.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Can scroll up and down, and stops when the beginning/end of history is
reached.
However, it probably breaks when the entire scrollback buffer has been
filled - we need to detect when the view has wrapped around to the
current terminal offset.
The detection of when we've reached the bottom of the history is also
flawed, and only works when we overshoot the bottom with at least a
page.
Resizing the windows while in a view most likely doesn't work.
The view will not detect a wrapped around scrollback buffer. I.e. if
the user has scrolled back, and is stationary at a view, but there is
still output being produced. Then eventually the scrollback buffer
will wrap around. In this case, the correct thing to do is make the
view start following the beginning of the history. Right now it
doesn't, meaning once the scrollback buffer wraps around, you'll start
seeing command output...
|
| | |
|
| | |
|
| |
|
|
| |
This allows us to free it when exiting
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The grid is now represented with an array of row *pointers*. Each row
contains an array of cells (the row's columns).
The main point of having row pointers is we can now move rows around
almost for free.
This is useful when scrolling with scroll margins for example, where
we previously had to copy the lines in the margins. Now it's just a
matter of swapping two pointers.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
\E4l is not horizontal index, but disable INSERT mode
|
| | |
|
| |
|
|
|
|
|
|
| |
This adds a pointer to the first cell on the current line. This
pointer must be updated every time the row changes.
The advantage is mainly that PRINT doesn't have to call
grid_get_range(), which is fairly expensive.
|
| |
|
|
|
| |
Instead of memmoving a large amount of data on every scroll, use a
sliding window. That is, each time we scroll, we offset origin.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Since cairo uses doubles, we don't want to have to convert a uin32_t
to double values every time we render a cell.
|
| |
|
|
|
|
|
|
|
| |
This means we don't have to explicitly set the foreground/background
to the grid's default colors whenever we reset/clear a cell, and we
can instead simply memset() the entire cell to 0.
This also means the renderer has to get the default color when
rendering a cell without a foreground/background color set.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Vim, for example, changes the scroll region every time you scroll a
single line. Thus, resetting the damage queue is slow.
This reworks the damage handling of scroll updates:
* Split damage queue into two: one for scroll operations and one for
update/erase operations.
* Don't separate update/erase operations inside/outside the scroll
region
* Store the current scroll region in the scroll damage operation. This
allows us to stack multiple scroll operations with different scroll
regions.
* When updating update/erase operations after a scroll operation,
split the update/erase operations if necessary (the current scroll
operation may have a scroll region different from before, thus
forcing us to split existing update/erase operations.
* The renderer no longer erases after a scroll. The scroll operation
also adds an erase operation. This also means that erase operation
are subject to adjustments by later scroll operations.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This is largely untested, but existing scrolling code has been
converted to using a terminal-global scrolling region that is defined
as start-end of the scrollable region.
This is compared to the old code where the scrolling region where
defined in terms of marginals, counted in lines from top and from
bottom.
|
| |
|
|
|
| |
This currently duplicates the code paths for DAMAGE_SCROLL; there are
many similarities between the two, but also major differences...
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Instead of having each cell in the grid track it's own dirtiness, grid
operations now append "damage" to a list.
This list is consumed every time we render the grid.
This allows us to special case some operations, like erase (and in the
future, scroll).
|
| | |
|
| | |
|
| |
|
|
|
|
| |
When printing to the right-most-cell, don't advance the
cursor. Instead, set a flag that indicates that the *next* print
should line-wrap.
|
| | |
|
| | |
|
| |
|