Age | Commit message (Collapse) | Author |
|
In issue jwilm/asacritty#31 a few people complained about Beam cursor
being weird with their fonts, so to make all cursors uniform in
alacritty, a custom cursor has been added for the Beam too.
The beam cursor's height is always the full height of the monospace font
glyph bounding box. The width depends on the font size. It is calculated
using the width of the cell and dividing it by two. The block is always
aligned at the far-left of the cell.
The implementation is identical to the one of the underline cursor, but
it has been refactored so the glyphs are created in `lib.rs`, which can
be used by darwin/macos to implement these features too.
A small bug in the underline cursor has also been fixed, until now the
width was just using the width of the unicode character. Now it should
be using the full width of the monospace glyph bounding box with every
font.
Here are some screenshots for the Beam cursor:
![Small](https://u.teknik.io/v1QH3.png)
![Normal](https://u.teknik.io/RTlp2.png)
![Big](https://u.teknik.io/DLu2M.png)
![Huge](https://u.teknik.io/pSAFX.png)
|
|
|
|
The unicode character comment has been updated to correctly reference
the character instead of commenting on the variable that might be that
character.
|
|
Because rendering with macos works differently, the old underline cursor
is used for that. The cursor symbol has also been setup as a constant in
the font project.
|
|
As mentioned in jwilm/alacritty#931, it can be troublesome if a font has
an underline symbol outside of the glyph's bounding box. This can lead
to the underline disappearing at the bottom of the terminal.
As a solution a symbol from the private use area was used as the
character code for the underline symbol. Whenever this symbol is
encountered, instead of rendering it, a custom block is rendered.
In this implementation the block has the full character as width and
sits flush with the bottom of the glyph's bounding box. The height is
half the distance between the baseline and the bottom of the bounding
box.
|
|
|
|
|
|
|
|
|
|
|
|
Also fixes warning from gl generator
|
|
When a selection was made, the last line of the selection did not
include a new line character when the line ending was selected. This
would occur if only one line was selected; if multiple lines were
selected, only the final line did not include a newline.
This commit updates the `string_from_selection` function to attempt to
append a newline character in all places where they are suitable.
Because of the simplification of newline insertion, several trait
implementations were removed.
|
|
|
|
The cascade list is now generated from Menlo for all fonts. This doesn't
feel correct to me, but it seems to give the expected behavior on macOS.
One of the problems cited was that certain glyphs like ❯ would not be
rendered with default cascade lists for some fonts.
|
|
This became a support burden for me due to various compile and run time
issues.
|
|
Homebrew Rust will correctly compile `alacritty` now, and the monospace
font is automatically set to `Menlo` at first launch.
|
|
Void Linux has the alacritty package in the main repository's, so compilation from source isn't needed.
|
|
|
|
The pixel-based scrolling behavior has been adapted to be as similar to
the line-based one as possible.
I still have not been able to test this. But this should have a decent
chance to at least kinda work.
|
|
Touchpads which use line-based instead of pixel-based updates send
partial scroll requests, so decimal numbers are important. The current
implementation only really used scroll amounts that are either 1 or -1.
This has been fixed and now the line-based touchpads should have very
smooth scrolling, but the pixel-based approach is still WIP and
completely untested.
|
|
This patch implements faux scrolling inside the alternate screen buffer.
Whenever the user scrolls up or down while the alternate screen buffer
is active, instead of actual scrolling three up/down arrow keys are
inserted.
|
|
Previously there were two separate but intended-to-be-identical
implementations. Now the two implementations simply delegate to a
single, shared method. This should help correctness issues in the
future.
|
|
|
|
When an atlas is full and the `insert` call fails, a new atlas should be
created. This is the current strategy, however the atlas is put at the
end of the vector, but the `current_atlas` index is set to 0, instead of
the last element. This leads to a recursion where it keeps trying to
insert into the full atlas at position 0 instead of the new at
`atlas.len() - 1`.
With this simple fix a stack-overflow is prevented because the new atlas
is inserted as the first element, which then will be used correctly for
loading new glyphs.
This fixes jwilm/alacritty/issues/842 and might also solve
jwilm/alacritty/issues/914 (I wasn't able to reproduce this with the
latest master).
|
|
|
|
|
|
|
|
|
|
Move/rename borderless into window_config as decorations
|
|
See 46a1ee72267c0979e980607098ce4ef00a3db1ac
|
|
Until winit gives us more capabilities in regard to window decorations
this implements a simple switch that renders the window without any
title bar or border
|
|
|
|
I dug into this and narrowed the issue down to the macOS app bundle
Info.plist file. So, I spun up a native macOS app real quick and tested
it by launching the binary directly and launching it via the app bundle.
When launching from the command line directly, it created multiple
windows & instances of the app. However, when launching via the app
bundle it behaved as I normally expect a macOS app to behave, that is
when launched multiple times to simply focus the already existing window
and instance.
This informed me that it wasn't something in code as much as it was
something in the app bundle configuration. Hence, I reworked the
Info.plist file based on the one that was created by XCode when I made
the native macOS app and it started behaving as expected.
|
|
|
|
The default cursor can now be configured through the cursor_style field
of the config. Valid options include Block, Underline, and Beam.
The default can be restored by sending \e[0q as in VTE terminals.
Live config reloading is supported for this parameter.
|
|
(needless_pass_by_value, needless_borrow).
|
|
|
|
|
|
(const_static_lifetime).
|
|
|
|
to "==".
|
|
|
|
This reverts commit a931d691a21a851ca4653cbab3542c600b72ff36.
Please see https://github.com/jwilm/alacritty/pull/907#issuecomment-345666727
for rationale w/ GIF.
> now alacritty starts "in stages". First it paints some small
> rectangle, and in a second in "boots" and fills up the available
> space.
|
|
|
|
|
|
* Support text cursor color escape codes
* Support reset color index escape code
* Support multiple colors in set color index escape code
|
|
Useful when requesting more info to help investigating issues.
|
|
|
|
|
|
|