Commit graph

898 commits

Author SHA1 Message Date
Kovid Goyal
6a07435bb0
hints kitten: Fix regression causing editing of favorites to sometimes hang 2023-04-26 15:23:38 +05:30
Kovid Goyal
a09464dee9
Fix a regression in the previous release that broke usage of custom themes
Fixes #6191
2023-04-17 08:45:46 +05:30
Kovid Goyal
b966013a2b
Make Samefile interface a bit nicer for working with paths 2023-04-17 08:35:50 +05:30
Kovid Goyal
046fbb860b
themes kitten: ignore custom theme files if they are stdout 2023-04-17 08:02:41 +05:30
Kovid Goyal
91700b3e42
Fix a bug in the Go code of the CSI key event parser
Fixes #6189
2023-04-16 15:31:56 +05:30
Kovid Goyal
7803b07e7f
Ignore leading and trailing space around values when parsing config lines 2023-04-06 10:45:34 +05:30
Kovid Goyal
912aa17594
... 2023-04-05 08:08:54 +05:30
Kovid Goyal
708267d229
Fix parsing of actions in map directives in Go 2023-04-05 07:55:18 +05:30
Kovid Goyal
3ee77a3a57
Fix #6154 2023-04-04 21:18:27 +05:30
Kovid Goyal
9919767aef
Remove unused code 2023-03-30 10:26:39 +05:30
Kovid Goyal
57ef0e29c0
Wait for keypress on panic in alternate screen kittens 2023-03-30 08:26:45 +05:30
Kovid Goyal
266746c96e
Implement the trim_whitespace option
Needed for help text formatting
2023-03-29 21:28:47 +05:30
Kovid Goyal
34526517de
Allow passing multiple options to control how wrapping is done 2023-03-29 20:56:24 +05:30
Kovid Goyal
cb99fbd83c
Dont remove leading and trailing spaces when wrapping
Without this we lose some spaces and also there was a case where the
line could end up longer than the specified width.
2023-03-29 20:47:31 +05:30
Kovid Goyal
37edc728a9
Implement drag scrolling for the diff kitten 2023-03-29 17:14:13 +05:30
Kovid Goyal
05e10d8066
Also parse negative numbers in CSI 2023-03-29 15:12:22 +05:30
Kovid Goyal
aebfdaa69a
Refactor diff mouse selection to use new render layout 2023-03-29 14:32:36 +05:30
Kovid Goyal
468168b9de
Refactor diff search to use new render layout 2023-03-29 13:22:34 +05:30
Kovid Goyal
67a9def013
Get copy to primary selection working 2023-03-28 17:15:28 +05:30
Kovid Goyal
676f576ace
Adjust the bounds of the mouse selection taking starting half cell into account 2023-03-28 15:12:41 +05:30
Kovid Goyal
8867818dfe
DRYer 2023-03-28 11:55:08 +05:30
Kovid Goyal
00d4841304
Make the mouse selection code re-useable 2023-03-28 11:48:22 +05:30
Kovid Goyal
94db6053d5
Turn off atomic update during direct transmission 2023-03-27 20:54:03 +05:30
Kovid Goyal
6dfe823dfb
... 2023-03-27 17:05:57 +05:30
Kovid Goyal
71580a2a93
Fix wheel event detection 2023-03-27 16:35:29 +05:30
Kovid Goyal
6504dd15c1
Update folder README 2023-03-27 13:20:10 +05:30
Kovid Goyal
ff55121094
Move the kittens Go code into the kittens folder 2023-03-27 13:06:02 +05:30
Kovid Goyal
3f9579d61d
Port the removed walk test to Go 2023-03-27 12:34:31 +05:30
Kovid Goyal
fb9d95038d
Free images in kitty when quitting diff kitten 2023-03-27 11:13:04 +05:30
Kovid Goyal
a3f1d3e132
Get image display working 2023-03-27 11:00:21 +05:30
Kovid Goyal
9cc54978e6
Fix margin formatting for binary lines 2023-03-27 08:23:10 +05:30
Kovid Goyal
d66da811db
More work on getting images to display in diff 2023-03-27 07:53:57 +05:30
Kovid Goyal
cece795b16
More work on image support for diff 2023-03-27 07:53:57 +05:30
Kovid Goyal
9eedcc1d2a
Better struct name 2023-03-27 07:53:57 +05:30
Kovid Goyal
508a61bd1c
More work on diffing images 2023-03-27 07:53:57 +05:30
Kovid Goyal
c745961f47
Nicer error messages for failure to load with Magick 2023-03-27 07:53:57 +05:30
Kovid Goyal
be886f9bf9
Make code for loading images with ImageMagick re-useable 2023-03-27 07:53:57 +05:30
Kovid Goyal
404a775f4b
Start work on image support for new diff kitten 2023-03-27 07:53:57 +05:30
Kovid Goyal
18445e20ff
... 2023-03-27 07:53:57 +05:30
Kovid Goyal
7b16132b75
Fix searching in full title lines 2023-03-27 07:53:57 +05:30
Kovid Goyal
0a8fc3f17c
... 2023-03-27 07:53:57 +05:30
Kovid Goyal
d57e47349b
Make searches case insensitive 2023-03-27 07:53:57 +05:30
Kovid Goyal
ccf1dfabbc
Fix highlighting of center changes 2023-03-27 07:53:56 +05:30
Kovid Goyal
de9edb6ff5
Manually specify the closing SGR for a span 2023-03-27 07:53:56 +05:30
Kovid Goyal
6590be84a2
... 2023-03-27 07:53:56 +05:30
Kovid Goyal
ccfae228b9
Avoid panics while rendering 2023-03-27 07:53:56 +05:30
Kovid Goyal
3236a42cb7
... 2023-03-27 07:53:56 +05:30
Kovid Goyal
e774deaef1
Fix tabs and carriage returns being incorrectly sanitized 2023-03-27 07:53:56 +05:30
Kovid Goyal
b5c2d85837
Fix diffing dirs 2023-03-27 07:53:56 +05:30
Kovid Goyal
2d18529d05
Show a message for identical files 2023-03-27 07:53:56 +05:30
Kovid Goyal
2ac170c1b1
Allowing using the anchored diff from the Go stdlib as the diff implementation 2023-03-27 07:53:56 +05:30
Kovid Goyal
9c188096d0
Prevent panics incase highlighting leads to different number of lines 2023-03-27 07:53:56 +05:30
Kovid Goyal
09c6a68804
Fix syntax highlighting of multiline tokens 2023-03-27 07:53:56 +05:30
Kovid Goyal
4c9efb6ff2
Fix bold/dim handling when wrapping 2023-03-27 07:53:56 +05:30
Kovid Goyal
4bc9cf84a3
Micro-optimization 2023-03-27 07:53:56 +05:30
Kovid Goyal
14b58ba015
Fix overrides not being parsed correctly 2023-03-27 07:53:56 +05:30
Kovid Goyal
29a896f9d8
... 2023-03-27 07:53:56 +05:30
Kovid Goyal
f8c83519fe
Reset styles after half lines 2023-03-27 07:53:56 +05:30
Kovid Goyal
91eaa89b3e
Fix various off-by-ones in the search code 2023-03-27 07:53:55 +05:30
Kovid Goyal
1926db8ee8
Correct cursor shape when inputting search query 2023-03-27 07:53:55 +05:30
Kovid Goyal
c19c614d9e
DRYer 2023-03-27 07:53:55 +05:30
Kovid Goyal
f7f6df675f
Implement searching the diff 2023-03-27 07:53:55 +05:30
Kovid Goyal
88bd3ee9ca
New SGR codes to turn off bold/dim independently
Allows for robust patching of formatting into already formatted
text. Without this it is not possible to turn off bold without
affecting existing dim and vice versa.
2023-03-27 07:53:55 +05:30
Kovid Goyal
e46a7c39c3
Fix failing test 2023-03-27 07:53:55 +05:30
Kovid Goyal
5086c62a81
Implement changing of context lines 2023-03-27 07:53:55 +05:30
Kovid Goyal
15b0dbb71c
Code to insert SGR formatting into already formatted strings 2023-03-27 07:53:55 +05:30
Kovid Goyal
2a185575b2
Implement drawing of status bar 2023-03-27 07:53:55 +05:30
Kovid Goyal
cf5ea96126
Ensure scroll position is correct after resize 2023-03-27 07:53:55 +05:30
Kovid Goyal
e2edacb629
DRYer 2023-03-27 07:53:55 +05:30
Kovid Goyal
c2e549b79c
Implement syntax highlighting 2023-03-27 07:53:55 +05:30
Kovid Goyal
4d61ad87b3
Implement jumping to fixed locations 2023-03-27 07:53:55 +05:30
Kovid Goyal
2905744dad
Implement scrolling by lines 2023-03-27 07:53:55 +05:30
Kovid Goyal
ebcf85428c
More work on porting diff kitten 2023-03-27 07:53:55 +05:30
Kovid Goyal
425ab4f6d8
Start implementing shortcut handling 2023-03-27 07:53:55 +05:30
Kovid Goyal
924cd4cadd
Do not add a trailing newline when wrapping 2023-03-27 07:53:55 +05:30
Kovid Goyal
e42b4fd9a6
Decrease allocs when wrapping 2023-03-27 07:53:54 +05:30
Kovid Goyal
18b58c5cf9
Ensure wrapping never results in lines longer than the specified word 2023-03-27 07:53:54 +05:30
Kovid Goyal
648925e83a
More work on porting diff kitten 2023-03-27 07:53:54 +05:30
Kovid Goyal
1c7d1094d4
More work on porting diff kitten 2023-03-27 07:53:54 +05:30
Kovid Goyal
41ea5f0c63
Ensure unique image id in single session 2023-03-27 07:53:54 +05:30
Kovid Goyal
ef7f13d893
title lines are now displayed 2023-03-27 07:53:54 +05:30
Kovid Goyal
5d8b5ab720
More work on porting diff kitten 2023-03-27 07:53:54 +05:30
Kovid Goyal
ee82cb5a52
More work on porting diff kitten 2023-03-27 07:53:54 +05:30
Kovid Goyal
e4d936b5ed
More work on porting the diff kitten 2023-03-27 07:53:54 +05:30
Kovid Goyal
293c0ab845
More work on porting the diff kitten 2023-03-27 07:53:54 +05:30
Kovid Goyal
bf1f0c00f4
Port full MIME type guessing to Go 2023-03-27 07:53:54 +05:30
Kovid Goyal
3c550bcd28
More work on porting diff kitten 2023-03-27 07:53:54 +05:30
Kovid Goyal
d208670172
Abstract typical config file loading with path and cli overrides 2023-03-27 07:53:54 +05:30
Kovid Goyal
5329546f21
Implement parsing of map 2023-03-27 07:53:54 +05:30
Kovid Goyal
44ff6bd1dd
Start work on porting diff kitten 2023-03-27 07:53:53 +05:30
Kovid Goyal
bf773351ed
DRYer 2023-03-17 11:00:00 +05:30
Kovid Goyal
509a45b579
Dont request release events for most kittens
They are not needed and there is always a small risk that a release
event could be delivered after the kitten has stopped reading from the
tty, thereby leaking into the environment.
2023-03-17 10:50:10 +05:30
Kovid Goyal
b0a4b932ad
... 2023-03-17 08:59:45 +05:30
Kovid Goyal
e2fda5d1c4
... 2023-03-15 15:32:04 +05:30
Kovid Goyal
da38cb3254
Add support for more option types to Go conf file parsing 2023-03-15 15:17:38 +05:30
Kovid Goyal
3803d7e3c2
Use maps package for generic keys/values functions 2023-03-14 22:49:40 +05:30
Kovid Goyal
7ce83e7fd0
Use the generic contains/index from slices instead of our custom one 2023-03-14 22:40:20 +05:30
Kovid Goyal
5520a75bba
Dont rely on filesystem mtimes for test as they can be flaky 2023-03-14 21:13:14 +05:30
Kovid Goyal
e539035639
more useful test failure messages 2023-03-14 21:06:57 +05:30
Kovid Goyal
290b868193
forgot to close zip file 2023-03-14 20:42:36 +05:30
Kovid Goyal
c19ac531cf
Fix some failing tests 2023-03-14 20:40:12 +05:30
Kovid Goyal
f6d66b2336
... 2023-03-14 20:35:31 +05:30
Kovid Goyal
0805330b77
Finish port of themes kitten to Go 2023-03-14 20:24:21 +05:30
Kovid Goyal
0c20a4d980
Fix sort with key implementations 2023-03-14 12:54:35 +05:30
Kovid Goyal
21954937fb
More work on porting themes 2023-03-14 12:29:44 +05:30
Kovid Goyal
c4731771ac
Make style cache thread safe 2023-03-14 12:29:44 +05:30
Kovid Goyal
ffb3b073d7
Convenient loop API to print styled strings 2023-03-14 12:29:44 +05:30
Kovid Goyal
6794ec1de7
Wire up the new subseq match code 2023-03-14 12:29:44 +05:30
Kovid Goyal
29dd2438c9
Port the subseq matcher to Go 2023-03-14 12:29:44 +05:30
Kovid Goyal
b088ab91cf
Make code to convert rune offsets to byte offsets re-useable 2023-03-14 12:29:44 +05:30
Kovid Goyal
dd783c842f
More work on porting themes UI to Go 2023-03-14 12:29:44 +05:30
Kovid Goyal
f9b0b54ee5
Start work on porting themes kitten to Go 2023-03-14 12:29:44 +05:30
Kovid Goyal
3741d3d1be
hints: fix select by word broken while porting to Go 2023-03-14 12:27:33 +05:30
Kovid Goyal
74c5692b78
Default permission for atomicupdate should be 0644 2023-03-11 10:04:43 +05:30
Kovid Goyal
48e7ebb838
make gofmt happy 2023-03-10 13:03:51 +05:30
Kovid Goyal
7f6ed72684
Nicer error message when custom processor produces invalid marks 2023-03-10 12:51:32 +05:30
Kovid Goyal
e78c398243
Fix offsets incorrect for non-ASCII chars when using custom processing
python gives us offsets in unicode characters. Go uses offsets in utf8
bytes. Translate.
2023-03-10 12:41:56 +05:30
Kovid Goyal
b76b0c61ed
Port custom processor for hints 2023-03-10 10:45:37 +05:30
Kovid Goyal
69916ca4e8
Remove python implementation of hints 2023-03-10 07:16:25 +05:30
Kovid Goyal
2e1eebd998
More work on porting hints 2023-03-10 06:58:10 +05:30
Kovid Goyal
5b3f5dd02d
Port all remaining hints matching tests 2023-03-09 20:53:46 +05:30
Kovid Goyal
0e5ed29d83
Fix generation of url regex for Go 2023-03-09 19:00:56 +05:30
Kovid Goyal
2aa9187428
More work on porting hints 2023-03-09 19:00:56 +05:30
Kovid Goyal
09ceb3c0be
Start work on porting hints kitten to Go 2023-03-09 19:00:56 +05:30
Kovid Goyal
88443ef8a5
icat: allow specifying image ids 2023-03-09 10:17:53 +05:30
Kovid Goyal
f42090766a
Use the new string scanner everywhere 2023-03-08 13:31:27 +05:30
Kovid Goyal
b8ce441453
A new string scanner thats faster than bufio.Scanner and has zero-allocation 2023-03-08 13:24:20 +05:30
Kovid Goyal
ebc1a0f0aa
Don't need to save/restore private mode values in icat when output unicode paceholder
Was originally there in case we turned off line wrapping. But didnt end
up doing that.
2023-03-08 10:33:43 +05:30
Kovid Goyal
cd332eb2d5
DRYer 2023-03-07 17:15:21 +05:30
Kovid Goyal
f157882856
Finish porting of ask kitten to Go 2023-03-07 17:06:00 +05:30
Kovid Goyal
018bf46ddb
kitty @ shell: Integrate completions from history 2023-03-07 17:01:21 +05:30
Kovid Goyal
ef6693a239
Dont insert empty spaces when no completions are found 2023-03-07 17:00:40 +05:30
Kovid Goyal
d7b0aa48c9
Dont display empty match groups 2023-03-07 16:53:52 +05:30
Kovid Goyal
ea1842407d
Auto accept completion when only a single candidate is present 2023-03-07 16:48:53 +05:30
Kovid Goyal
0e73c01093
readline: Automatically do word completion based on history 2023-03-07 16:44:02 +05:30
Kovid Goyal
4cef83ffd0
show message even for password asks 2023-03-07 14:03:39 +05:30
Kovid Goyal
0da998ac53
Implement reading of password 2023-03-07 13:55:45 +05:30
Kovid Goyal
bb22990af9
... 2023-03-07 13:55:45 +05:30
Kovid Goyal
7ad5dc6a6f
Fix mouse CSI parsing 2023-03-07 13:55:44 +05:30
Kovid Goyal
0aa55fb755
Start work on porting the ask kitten 2023-03-07 13:55:44 +05:30
Kovid Goyal
e043fef257
Synthesize click events in the loop 2023-03-07 07:57:14 +05:30
Kovid Goyal
5c87d7f84f
Cleanup ring buffer implementation 2023-03-07 07:43:53 +05:30
Kovid Goyal
37cebbc817
Implement decoding of mouse events in Go 2023-03-07 07:20:46 +05:30
Kovid Goyal
99b23c5c66
... 2023-03-05 14:25:19 +05:30
Kovid Goyal
db972f3442
Cleanup parsing of single char options 2023-03-05 14:22:53 +05:30
Kovid Goyal
23d2293296
More tests for rg arg parsing 2023-03-05 14:09:04 +05:30
Kovid Goyal
716a048e6c
... 2023-03-05 14:02:19 +05:30
Kovid Goyal
a252ff1c7b
Merge branch 'hold-kp-enter' of https://github.com/page-down/kitty 2023-03-05 14:00:39 +05:30
pagedown
2ee30302fe
hold: Allow pressing the numeric keypad enter key to exit 2023-03-05 16:18:29 +08:00
Kovid Goyal
6660071d3a
Port the hyperlinked_grep kitten to Go 2023-03-05 13:41:57 +05:30
Kovid Goyal
a0d30f4dd8
DRYer 2023-03-05 13:41:36 +05:30
Kovid Goyal
c88a171b28
Map should use same order of arguments as pythons map 2023-03-05 12:19:03 +05:30
pagedown
e9f5806dcd
Update to Nerd Fonts 2.3.3 2023-03-04 23:23:52 +08:00
Kovid Goyal
a2887bb9e0
get rid of utils.Cut since we can now rely on strings.Cut instead 2023-03-04 13:37:55 +05:30
Kovid Goyal
defac0c061
Implement automatic tmux passthrough for icat 2023-03-04 13:01:23 +05:30
Kovid Goyal
8bd814444c
Fix active TMUX session detection 2023-03-04 12:50:07 +05:30
Kovid Goyal
1218a152bf
Implement unicode placeholders in icat 2023-03-04 11:54:22 +05:30
Kovid Goyal
5b160ea599
Use Once for CachedHostname 2023-03-03 15:20:35 +05:30
Kovid Goyal
e6662e11c3
Dont change the tmux allow-passthrough mode if it is already set 2023-03-03 15:06:49 +05:30
Kovid Goyal
1bf911a81b
Generate the rowcol diacrticis for Go as well 2023-03-03 14:39:38 +05:30
Kovid Goyal
f0aacbd437
Remove unused code 2023-03-01 16:54:06 +05:30
Kovid Goyal
5b46d990a2
Add Read/Write to the MMap interface 2023-02-28 19:01:15 +05:30
Kovid Goyal
944e036611
DRYer 2023-02-28 15:48:04 +05:30
Kovid Goyal
1b2fe90ed1
Fix askpass.go on shm_syscall based systems 2023-02-28 14:11:27 +05:30
Kovid Goyal
ba1ce996bb
Fix WriteWithSize() on shm_syscall 2023-02-28 13:50:06 +05:30
Kovid Goyal
327cefbfda
Make test more robust 2023-02-28 13:44:29 +05:30
Kovid Goyal
ce12fd3515
Fix ReadWithSizeAndUnlink on systems that have syscall based mmap 2023-02-28 13:44:09 +05:30
Kovid Goyal
4d3ce47813
... 2023-02-28 13:19:51 +05:30
Kovid Goyal
8729717229
Dont create SHM files in the bootstrap limit and related tests 2023-02-28 13:16:00 +05:30
Kovid Goyal
1ddb1dc5e1
... 2023-02-28 13:00:19 +05:30
Kovid Goyal
3558d1c274
Finish porting support for color schemes to SSH kitten 2023-02-28 12:08:55 +05:30
Kovid Goyal
c877b2a5cb
Code to dump basic colors from a theme as escape codes 2023-02-27 08:02:22 +05:30
Kovid Goyal
c1791c8d2b
Function to load theme code 2023-02-26 22:09:07 +05:30
Kovid Goyal
22150e13fd
Add tests for cache file downloading 2023-02-26 21:56:03 +05:30
Kovid Goyal
7ce64fcde0
Support include when loading themes from dirs 2023-02-26 21:16:29 +05:30
Kovid Goyal
0b09d18b36
Port theme loading code to Go 2023-02-26 20:40:59 +05:30
Kovid Goyal
4eea2fd4fc
Port code to download themeball to Go 2023-02-26 15:21:49 +05:30
Kovid Goyal
c113ad6f56
Code to parse ISO8601 timestamps at least semi-robustly 2023-02-26 13:32:35 +05:30
Kovid Goyal
64cb9c9542
More work on porting ssh kitten 2023-02-26 11:26:28 +05:30
Kovid Goyal
4a5c6ad47f
Functions to punch DCS escapes through tmux 2023-02-26 11:11:42 +05:30
Kovid Goyal
6de77ce987
Clean up exclude pattern handling 2023-02-26 09:12:12 +05:30
Kovid Goyal
5cc3d3cbfe
Fix remaining failing tests 2023-02-26 08:01:04 +05:30
Kovid Goyal
dc938cf3dd
More test fixes 2023-02-26 08:01:04 +05:30
Kovid Goyal
22ea33182a
Fix various test failures 2023-02-26 08:01:04 +05:30
Kovid Goyal
3f417b26b2
Wire up the new ssh kitten into the python ssh kitten tests 2023-02-26 08:01:04 +05:30
Kovid Goyal
e4002b5691
Switch to a more capable glob implementation that supports ** 2023-02-26 08:01:04 +05:30
Kovid Goyal
77c04107f3
Add test for tarfile exclusion 2023-02-26 08:01:03 +05:30
Kovid Goyal
e02ba7f389
Port bootstrap script length limit 2023-02-26 08:01:03 +05:30
Kovid Goyal
9870c94007
More work on porting the SSH kitten 2023-02-26 08:01:03 +05:30
Kovid Goyal
6b71b58997
Add write API to shm objects 2023-02-26 08:01:03 +05:30
Kovid Goyal
43bcb41a2a
Nicer Set constructor 2023-02-26 08:01:03 +05:30
Kovid Goyal
1df3ef648c
Clean up getting runtime dir on darwin 2023-02-26 08:01:03 +05:30
Kovid Goyal
4d8ccd8e94
... 2023-02-26 08:01:03 +05:30
Kovid Goyal
f40380b05a
More useful Set methods 2023-02-26 08:01:03 +05:30
Kovid Goyal
3703b4dbef
API to conveniently generate secure tokens 2023-02-26 08:01:03 +05:30
Kovid Goyal
907a51c99c
Code to read needed options from kitty.conf in a kitten 2023-02-26 08:01:03 +05:30
Kovid Goyal
0614c63966
Handle XDG_CONFIG_DIRS in Go as well 2023-02-26 08:01:03 +05:30
Kovid Goyal
a84b688038
Embed the data files needed for the ssh kitten into the Go binary 2023-02-26 08:01:03 +05:30
Kovid Goyal
b4b8943e64
Replace some more uses of sync.Once 2023-02-26 08:01:03 +05:30
Kovid Goyal
587d06b295
Replace use of sync.Once 2023-02-26 08:01:03 +05:30