Commit Graph

314 Commits

Author SHA1 Message Date
Kovid Goyal
eb14714f1e ... 2023-08-07 12:30:30 +05:30
Kovid Goyal
6c7a8f8fa9 Ensure usage of __attribute__(cleanup) never frees un-initialized memory
Use macros that take an initializer parameter to, thereby ensuring the
variable to be cleaned up is always initialized.
2023-08-07 12:24:18 +05:30
Kovid Goyal
9af4d5e0fc Fix error from asan when built with clang 2023-08-07 11:46:18 +05:30
Kovid Goyal
b83e4d88f4 Implement fast padding-less base64 encode/decode for python 2023-07-30 19:49:38 +05:30
Konstantin Borisov
ee4a9c6ed8 fixed CENTER_CLAMPED to center images bigger than view, added CENTER_SCALED background image layout option 2023-07-13 21:26:25 +05:30
Campbell Jones
55fd885491 Add option to set XDG sound theme on Linux 2023-03-18 16:38:29 -04:00
Sergei Grechanik
d63eeada73 Image placement using Unicode placeholders
This commit introduces the Unicode placeholder image placement method.
In particular:
- Virtual placements can be created by passing `U=1` in a put command.
- Images with virtual placements can be displayed using the placeholder
  character `U+10EEEE` with diacritics indicating rows and columns.
- The image ID is indicated by the foreground color of the placeholder.
  Additionally, the most significant byte of the ID can be specified via
  the third diacritic.
- Underline color can be optionally used to specify the placement ID.
- A bug was fixed, which caused incomplete image removal when it was
  overwritten by another image with the same ID.
2023-02-21 18:23:16 -08:00
Kovid Goyal
2307892b50 Cleanup previous PR getting kitty working on macOS
Do not reduce the required OpenGL version on macOS. There is no point
anyway.

Fixes #2790
2023-02-10 11:03:25 +05:30
Kovid Goyal
a09dda27dc Merge branch 'master' of https://github.com/marcan/kitty 2023-02-10 10:55:41 +05:30
Kovid Goyal
68cf9f7514 Switch to tracking linewrap on the last cell in a line
This allows us to have newline not affect the wrap status of a line.

Now a lines wrapping status is changed only when the last cell
in the line is changed. This actually matches the behavior of many other
terminal emulators so is probably a good thing from a ecosystem
compatibility perspective.

The fish shell expects this weird behavior of newline not changing
wrapping status, for unknown reasons, which is the actual motivation for
doing all this work.

Fixes #5766
2022-12-26 20:26:21 +05:30
Hector Martin
84aebae6a8 Downgrade OpenGL version requirement to 3.1
There are only a few features required from newer versions, and they
can be achieved via extensions. This significantly improves compatibility.
2022-12-20 16:22:05 +09:00
Kovid Goyal
ae8f3de070 Allow centering the background image
Fixes #5525
2022-10-04 08:26:28 +05:30
Kovid Goyal
df4738f080 ... 2022-08-12 11:24:18 +05:30
Kovid Goyal
f3329fcd34 Fix storage for GLFW_MOD_KITTY 2022-08-12 09:58:50 +05:30
Kovid Goyal
f228f8368a A faster version of SingleKey 2022-08-12 09:17:42 +05:30
Kovid Goyal
2b3be147e6 Allow three combining chars per cell
Makes use of otherwise wasted padding in the CPUCell struct
2022-04-28 09:45:34 +05:30
Kovid Goyal
6b47f6f769 Make adding new underline styles easier in the future 2022-02-04 14:05:19 +05:30
Joseph Adams
a2c4f830b3 Enable use of higher options for underlining text.
In `Colored and styled underlines` it's proposed that the SGR codes
\e[4:4m and \e[4:5m are used to add a dotted or dashed underline to the
rendering context respectively. This commit prepares the necessary
changes to add the two additional underline style, while still rendering
them as a normal underline and curly underline.
2022-01-13 17:27:02 +01:00
Kovid Goyal
3d2877eeb9 More work on per window logo 2021-12-03 13:19:10 +05:30
Kovid Goyal
bd21b79959 Only malloc the buffer for fast file copy when needed 2021-11-24 18:20:37 +05:30
Kovid Goyal
732ff7ee58 Move copy between files into its own module 2021-11-24 16:42:52 +05:30
Kovid Goyal
c1cb196365 Set the media role when playing the bell sound to "event"
Fixes #4256
2021-11-19 14:14:50 +05:30
pagedown
b4a6ed8d8f Allows the visual bell color to be configured 2021-11-02 19:38:36 +08:00
itepechi
9289c2de69 Refactor background_image_anchor for cleaner code 2021-10-30 04:34:33 +09:00
itepechi
87d79c7415 Change the naming of directions in option background_image_anchor for consistency
Replaced cardinal directions with "relative" directions.
2021-10-30 04:34:33 +09:00
itepechi
86d7aaa03a Add clamped to option background_image_layout 2021-10-30 04:34:33 +09:00
itepechi
2aa01c58a1 Add option background_image_anchor to configure bgimage position 2021-10-30 04:34:32 +09:00
Kovid Goyal
2443dc135c Use a faster implementation of the Color type
Now implemented in C
2021-10-28 11:15:13 +05:30
Kovid Goyal
0fdafd8398 Allow rendering the cursor with reverse video
Also clean up handling of dynamic global colors.
TODO: Implement none for selection_fg
TODO: Add some tests
TODO: Check that changing colors via remote control works

Fixes #126
2021-10-28 00:21:12 +05:30
Kovid Goyal
729cea88f3 More sophisticated OSC 133 parsing with support for secondary prompts 2021-10-22 11:54:54 +05:30
Kovid Goyal
463133abbe Fix #4095 2021-10-05 07:20:40 +05:30
Kovid Goyal
9a3d99515f Add support for reporting mouse events with pixel co-ordinates using the SGR_PIXEL_PROTOCOL introduced in xterm 359 2021-09-28 11:41:35 +05:30
Kovid Goyal
259ca4a11e Speed up parsing of file transfer OSC codes
Avoid roundtrips between unicode and bytes objects
2021-09-25 14:05:21 +05:30
Kovid Goyal
1cef544cff Allow sending escape code to child in chunks 2021-09-24 16:54:04 +05:30
Kovid Goyal
bbdfdb978d Modify canberra wrapper to allow specifying a sound file path 2021-09-24 07:31:02 +05:30
Kovid Goyal
a0740d1616 Use multi-phase initialization for unicode-names 2021-09-17 08:56:55 +05:30
Kovid Goyal
ef76c075e0 Get rid of bits from CellAttrs 2021-08-18 10:06:08 +05:30
Kovid Goyal
b260a61c8f Get rid of bits from LineAttrs 2021-08-18 10:06:08 +05:30
Kovid Goyal
780e526143 Use a union for cell attributes
Cleaner code, no performance impact
2021-08-18 10:06:08 +05:30
Kovid Goyal
1f5fa03015 Use a union for line attrs
Allows faster construction of Line objects without needing to set
individual booleans. And cleaner code.
2021-08-18 10:06:08 +05:30
Kovid Goyal
d4dd226d8f Preserve prompt markings when copying lines and rewrapping them 2021-08-18 10:06:04 +05:30
Kovid Goyal
0d4237f802 Mark prompt lines 2021-08-18 10:06:04 +05:30
Kovid Goyal
cd6b3da665 Fix turning off cursor blink via escape codes not working
Also fix cursor blink stopping after terminal reset. The default cursor
state should be blinking.

Fixes #3808

...
2021-07-07 20:45:46 +05:30
Kovid Goyal
33de0f821f Use uthash for the sprite position cache 2021-05-07 06:58:54 +05:30
Kovid Goyal
0372242d12 Use an enum for UTF8 decoder state 2021-03-31 15:19:27 +05:30
Kovid Goyal
62912a800a Ban a bunch of unsafe C functions from the codebase
List is taken from the git codebase
2021-03-05 08:26:05 +05:30
Kovid Goyal
2a96d2621c Use cleanup in a few more places to simplify the code 2021-02-19 18:53:30 +05:30
Kovid Goyal
d55fde9eea Use EINTR safe wrappers for open() and shm_open() 2021-01-31 07:02:11 +05:30
Kovid Goyal
f9844ba3b0 Allow negative numbers in CSI codes 2021-01-21 07:06:43 +05:30
Kovid Goyal
295e8db04c remove unused code 2021-01-16 20:52:12 +05:30