Commit Graph

123 Commits

Author SHA1 Message Date
Kovid Goyal
5d120a2f36 Output prompt marking when serializing to ANSI 2022-02-15 08:57:17 +05:30
Kovid Goyal
e06b774174 Avoid double scan of output to look for escape codes 2022-02-13 17:33:13 +05:30
Kovid Goyal
a0e4449fb2 Ensure prefixchar is written even for empty lines 2022-02-13 15:49:46 +05:30
Kovid Goyal
a4abe26d32 Fix copy ansi to clipboard ignoring newlines 2022-02-13 15:09:14 +05:30
Kovid Goyal
ce8b0cf748 Allow using line_as_ansi with ranges 2022-02-09 21:40:33 +05:30
Kovid Goyal
e0c4a90aa3 DRYer 2022-01-28 13:21:54 +05:30
Kovid Goyal
93dbcab10a Refactor code to get cell colors 2021-10-28 13:35:30 +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
be34af4555 Remove inline from .c files
It is ignored by compilers and hides unused static functions
2021-08-03 09:11:17 +05:30
Kovid Goyal
81411e6b54 Fix trailing parentheses in URLs not being detected
Also fix URLs starting near the end of the line not being detected.

Fixes #3688
2021-06-04 18:13:36 +05:30
Kovid Goyal
11268ffa16 Fix marking of text not working on lines that contain zero cells
Zero cells are passed to the regex engine as spaces, so they must
increment the match_pos counter. Fixes #3403
2021-03-23 10:04:58 +05:30
Kovid Goyal
c0ec60c113 Forgot to change a couple of usages of line_as_unicode 2021-03-23 09:56:58 +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
9d4246a285 Output hyperlink markup when serializing as ANSI 2020-09-22 16:18:22 +05:30
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
78dc93721d Add tests for hyperlink storage 2020-09-10 10:47:27 +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
4a740cc556 Cleanup 2020-08-06 18:14:56 +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
Andrew Mayorov
9fe631ee3f Provide support for CSI REP control code 2020-05-29 01:05:49 +03:00
Kovid Goyal
082546a1e7 Marks: Fix marks not handling wide characters and tab characters correctly
Fixes #2534
2020-04-12 13:28:21 +05:30
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
645890ccc8 Make the set of URL prefixes that are recognized while hovering with the mouse configurable
Fixes #2416
2020-03-08 13:16:34 +05:30
Kovid Goyal
511c4da6a3 Workaround for bug in less that causes colors to reset at wrapped lines
Fixes #2381
2020-02-25 19:14:24 +05:30
Kovid Goyal
af8fdf1dbe Dont use a macro for as_text_generic 2020-02-25 15:33:12 +05:30
Kovid Goyal
b7d12de0a7 Avoid transitions in line_as_ansi on marks 2020-02-25 14:49:17 +05:30
Kovid Goyal
43326c9bd0 Fix URL detection not working for urls of the form scheme:///url
Fixes #2292
2020-01-17 07:49:01 +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
04006ea81e Wrapper functions to handle passing matching values to C code 2020-01-13 06:50:36 +05:30
Kovid Goyal
1723616968 Code to apply match colors based on match results 2020-01-13 06:50:36 +05:30
Kovid Goyal
23bc2171c9 Avoid a double call for mark functions 2020-01-13 06:50:36 +05:30
Kovid Goyal
32dfc94909 Implement a hack to (mostly) preserve tabs when cat a file with them and then copying the text or passing screen contents to another program
It's a simple enough hack that it seems worth doing. If it causes any
issues, can always be reverted.

Fixes #1829
2019-08-31 12:37:05 +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
bd3f0b5363 Properly handle all NULL cases 2019-08-25 17:22:06 +03:00
s1341
6fae3545c7 Fix null pointer deref 2019-08-25 16:39:39 +03:00
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
6a31909557 Make the MIN and MAX macros typesafe 2019-07-01 17:03:47 +05:30
Kovid Goyal
1369a36178 Exclude variation selectors when finding fallback font 2019-05-13 20:36:29 +05:30
Kovid Goyal
de130787f6 Make the charsets code useable in kittens 2019-01-23 11:33:45 +05:30
Kovid Goyal
e0b3bb1830 Move URL parser enum into parser function 2018-12-04 06:59:03 +05:30
Kovid Goyal
47ec372c30 Fix hover detection of URLs not working when hovering over the first colon and slash characters in short URLs
Fixes #1201
2018-12-04 06:52:26 +05:30
Kovid Goyal
ab97646576 Have line_as_ansi indicate when the output is truncated 2018-11-20 11:13:49 +05:30
Kovid Goyal
ee3ce3c7d8 Move cell_as_sgr to line.c 2018-09-30 08:58:33 +05:30
Dominique Martinet
2fe17aa889 cursor_as_sgr now works on GPUCells becomes cell_as_sgr 2018-09-22 19:10:09 +09:00