According to the text just above https://docs.python.org/3/library/exceptions.html#EnvironmentError, `EnvironmentError` has been an alias of `OSError` since Python 3.3. Replacing it makes the code more consistent since `OSError` is used in other places in the code too.
The time is stored in a signed 64 bit integer with nanosecond accuracy. This eliminates the possibility of floating-point inaccuracies.
`monotonic_t` can currently hold values large enough to work correctly for more than 200 years into the future.
Using a typedef instead of directly using `int64_t` everywhere will also allow easily changing the datatype in the future should the need arise for more precise or bigger time values.
kitty now supports the SGR DIM escape code, which makes text fade into
the background. It works by alpha blending the text color into the
background color. Fixes#446
Debian's [mips] build failed one of the font tests:
FAIL: test_sprite_map (kitty_tests.fonts.Rendering)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/kitty_tests/fonts.py", line 48, in test_sprite_map
self.ae(test_sprite_position_for(0, 1), (0, 1, 1))
self = <kitty_tests.fonts.Rendering testMethod=test_sprite_map>
AssertionError: Tuples differ: (0, 0, 0) != (0, 1, 1)
First differing element 1:
0
1
- (0, 0, 0)
? ^ ^
+ (0, 1, 1)
? ^ ^
This was due to test_sprite_position_for() using the "I" code to parse
into an unsigned short. Since mips is big endian, the "wrong" byte was
stored into extra_glyphs.data.
This commit changes all similar data type mismatches that were found
from auditing calls to PyArg_ParseTuple/Py_BuildValue.
[mips]: https://buildd.debian.org/status/fetch.php?pkg=kitty&arch=mips&ver=0.9.0-1&stamp=1524126606&raw=0
The system wcwidth() is often wrong. Not to mention that if you SSH into
a different machine, then you have a potentially different wcwidth. The
only sane way to deal with this is to use the unicode standard.
Use a level of indirection to store combining characters. This allows
combining characters to be stored using only two bytes, even if they are
after USHORT_MAX
By avoiding python in the child process before exec we ensure that
malloc and other unsafe to use after fork functions are not used.
Should also mean that less pages will need to be copied into thec hild
process, leading to marginally faster startups.