Commit Graph
68 Commits
Author SHA1 Message Date
Kovid Goyal 93dbcab10a Refactor code to get cell colors 2021-10-28 13:35:30 +05:30
Kovid Goyal 729cea88f3 More sophisticated OSC 133 parsing with support for secondary prompts 2021-10-22 11:54:54 +05:30
Luflosi 0fe7796df0 Fix Clang warning
Without this, Clang would complain:
```
In file included from kitty/fonts.c:9:
In file included from kitty/fonts.h:9:
kitty/lineops.h:67:29: error: suggest braces around initialization of subobject
      [-Werror,-Wmissing-braces]
    const CellAttrs zero = {0};
                            ^
                            {}
```
2021-08-19 22:52:36 +02:00
Kovid Goyal ef76c075e0 Get rid of bits from CellAttrs 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 196200d03f Dont reflow the current prompt when resizing
This ensures that there is no leftover line when the shell redraws the prompt,
by making the prompt a simple single character prompt before rewrapping.
2021-08-18 10:06:04 +05:30
Kovid Goyal 4a9a021b2c DRYer 2021-08-18 10:06:04 +05:30
Kovid Goyal 0d4237f802 Mark prompt lines 2021-08-18 10:06:04 +05:30
Kovid Goyal 4ab299d0af When reflowing the screen, also reflow the saved cursor position 2021-06-03 15:35:48 +05:30
Kovid Goyal cf3662442f Fix #3460 2021-04-09 16:56:53 +05:30
Kovid Goyal ca7587c084 Allow skipping zero cells when converting a line to unicode 2021-03-23 09:53:22 +05:30
Kovid Goyal d743aff4bc Make the code to copy lines into linebufs general 2021-03-17 22:02:47 +05:30
Kovid Goyal 071986138b Cleanup previous merge 2021-03-17 13:43:26 +05:30
Eddie Lebow 4682da83c1 Add linebuf_continued_lines_count() 2021-03-17 02:27:58 -04:00
Eddie Lebow c93c87e8fe Add linebuf_add_line_to_top() 2021-03-17 00:09:03 -04:00
Eddie Lebow 6c44b4f451 Add historybuf_pop_line() 2021-03-15 23:59:26 -04:00
Kovid Goyal e0f5c39297 Get rid of unneeded malloc in as_text_generic 2020-09-22 09:57:45 +05:30
Kovid Goyal a78515e5bf Remove the max size limit for line_as_ansi
Needed for output of hyperlinks, also more efficient, since avoids
malloc per line. Also fix pagerhist not having SGR reset at the start of
every line.
2020-09-20 11:26:59 +05:30
Kovid Goyal 33beecddda Implement storage of URLs in a hash map 2020-09-10 10:47:27 +05:30
Kovid Goyal e99d93ca30 Implement parsing of OSC 8
Also start work on storing hyperlinks with cells
2020-09-10 10:47:24 +05:30
Kovid Goyal e2e701460b Fix the CSI J (Erase in display ED) escape code not removing line continued markers
Fixes #2809

Remains to write tests for this.
2020-06-29 14:17:40 +05:30
Kovid Goyal 9ba808ec3c Merge branch 'ft/csi-code-rep' of https://github.com/keynslug/kitty 2020-06-01 14:31:34 +05:30
Kovid Goyal eacf849e3a Add bounds check to left_shift_line()
Fixes #2710
2020-05-31 08:10:58 +05:30
Andrew Mayorov 9fe631ee3f Provide support for CSI REP control code 2020-05-29 01:05:49 +03:00
Kovid Goyal 12f37bcfad Dont strip trailing punctuation from end of URL if next line startswith url characters 2020-03-15 08:47:52 +05:30
Kovid Goyal e03aabd972 Some consting 2020-02-25 20:03:14 +05:30
Kovid Goyal af8fdf1dbe Dont use a macro for as_text_generic 2020-02-25 15:33:12 +05:30
Kovid Goyal 936f2186cc Allow scrolling to marks 2020-01-15 07:11:34 +05:30
Kovid Goyal 35fb702833 Use only a single marker function
Multipe colors/expressions can instead be combined at definition time
2020-01-13 11:57:19 +05:30
Kovid Goyal 23bc2171c9 Avoid a double call for mark functions 2020-01-13 06:50:36 +05:30
Kovid Goyal c905978874 Merge branch 'fix_issue_1924' of https://github.com/s1341/kitty
Fixes #1924
2019-08-26 10:19:50 +05:30
s1341 297963f6ab Fix issue #1924 by making prev_cell persistent across line_as_ansi calls 2019-08-25 16:25:36 +03:00
Kovid Goyal 1369a36178 Exclude variation selectors when finding fallback font 2019-05-13 20:36:29 +05:30
Kovid Goyal 60de840d69 Merge branch 'selection_wide_hilight' of https://github.com/martinetd/kitty 2018-11-30 09:27:05 +05:30
Dominique Martinet 2aac220cdb selection: hilight 2nd half of wide characters last in line 2018-11-30 11:50:26 +09:00
Kovid Goyal ab97646576 Have line_as_ansi indicate when the output is truncated 2018-11-20 11:13:49 +05:30
Kovid Goyal ab818ed89f IBUS: Fix update of pre-edit text not working correctly
Fixes #793
2018-08-06 11:30:33 +05:30
Kovid Goyal e5a720c6fa Fix detection of URLs in HTML source code (URLs inside quotes)
Fixes #785
2018-08-03 12:28:23 +05:30
Kovid Goyal 5b1eaa741c IME input: Show the pre-edit text while the IME is in progress
Text is show in reverse video
2018-07-12 18:18:21 +05:30
Kovid Goyal 8dea5b3e3e Reduce data sent to GPU per draw by 30%
Split up the Cell structure into a CPUCell and a GPUCell. Only the
GPUCell part needs to be sent to the GPU. Should make kitty use even
less system resources and make a performance difference on systems where
the GPU bandwidth is constrained.

Also allows adding more CPU only data in the future without affecting
GPU bandwidth. For example, hyperlinks or more combining characters.
2018-05-27 21:25:09 +05:30
Kovid Goyal bb06bfa627 Cleanup the as_text_generic macro
Also allow adding a \r at the end of each visual line
2018-05-18 23:06:06 +05:30
Kovid Goyal 3f316c39d1 Dynamically allocate the scrollback history buffer
Reduces startup memory consumption when using very large scrollback
buffer sizes.
2018-05-03 15:17:02 +05:30
Kovid Goyal 2cec0908a5 Fix a segfault when getting the contents of the scrollback buffer as text
Fixes #398
2018-03-16 21:10:48 +05:30
Kovid Goyal 9c21610215 Use a single generic function to get text and ANSI representations of all buffers 2018-02-14 20:38:53 +05:30
Kovid Goyal 2ee9844c2b Track cursor position explicitly during rewrap
Instead of using heuristics to position the cursor after a resize, track
the position during re-wrapping and place the cursor at the re-wrapped
position. Fixes #242 (I hope)
2018-02-02 13:06:18 +05:30
Kovid Goyal 409bd37db5 Store combining chars as an array in the Cell
Makes it easier to increase the number of combining chars if needed,
rather than storing them as a mask.
2018-01-18 14:10:58 +05:30
Kovid Goyal 1ef010689d Add support for clearing the scrollback buffer
kitty now supports using \E3J to clear the screen and scrollback buffer.
See #268
2018-01-06 23:55:49 +05:30
Kovid Goyal 0fcce6ec58 Remove trailing whitespace from native code files 2017-12-20 08:44:47 +05:30
Kovid Goyal 95683c658b When hovering over a URL, highlight the URL fully even if it continues over multiple lines. Note that URL detection has not changed. A URL will be detected only if the mouse hovers over the line containing the start of the URL. 2017-12-13 11:11:13 +05:30