Kovid Goyal
fb57653665
Make debugging kittens a little nicer
...
Now debug() writes to the stderr of the parent kitty process instead of
a temp file.
2018-05-19 16:32:08 +05:30
Kovid Goyal
646a349d82
...
2018-05-19 15:11:08 +05:30
Kovid Goyal
ad1109b6fe
Hints kitten: Overhaul making it more intelligent
...
It now uses information about the geometry of the screen.
So URLs that stretch over multiple lines are detected even if there is a
hard line break in between (some programs like mutt generate these).
2018-05-19 14:31:00 +05:30
Kovid Goyal
2a713cab60
kittens should specify their own required input type
...
It is DRYer. Also replace the run_kitten function with just kitten that
takes no type of input argument. Backward compat for run_kitten is
maintained.
2018-05-18 22:55:42 +05:30
Kovid Goyal
26df57a1c7
More elegant handling for pressing enter with no valid current input in the hints kitten
2018-05-18 21:28:43 +05:30
Kovid Goyal
6020aadbf2
diff kitten: Show overall diff stats
2018-05-18 14:19:25 +05:30
Kovid Goyal
f8b6b532e0
diff kitten: Show scroll %
2018-05-18 13:36:12 +05:30
Kovid Goyal
8ea84c97d5
Use an overlay window for window resizing
...
Also implement a remote command to resize windows
2018-05-17 23:26:41 +05:30
Kovid Goyal
91a1d61cc6
diff: Fix margins not being reset on exit
2018-05-10 16:21:26 +05:30
Kovid Goyal
b8e9921f3d
Forgot this file in previous commit
2018-05-10 16:20:58 +05:30
Kovid Goyal
e0ce5d5629
tui: Cleanup unhandled exception processing
...
Also handler finalization should happen before term manager
finalization.
2018-05-10 16:20:33 +05:30
Kovid Goyal
ed511c296c
Avoid needing to resend images on every draw_screen()
2018-05-10 15:58:52 +05:30
Kovid Goyal
eab1fbbbb0
diff: Mark displayed images as change starts
2018-05-10 15:29:53 +05:30
Kovid Goyal
ee3b052a50
tui: Preserve cursor position when placing images
2018-05-10 15:27:35 +05:30
Kovid Goyal
51d76e5a2b
...
2018-05-10 14:37:43 +05:30
Kovid Goyal
a6bce0b221
diff: More work on showing images
2018-05-10 14:33:09 +05:30
Kovid Goyal
fb5dc8a2ba
A spot of refactoring
2018-05-10 11:52:51 +05:30
Kovid Goyal
d571ee0d01
diff: More work on displaying images
2018-05-10 11:50:46 +05:30
Kovid Goyal
5d7ed67316
diff: More work on displaying images
2018-05-10 10:36:50 +05:30
Kovid Goyal
2e313fbdd2
Better exception for image conversion failure
2018-05-09 20:50:56 +05:30
Kovid Goyal
5c3e4db05f
DRYer
2018-05-09 20:36:53 +05:30
Kovid Goyal
2be2f6aa0c
Make icat a kitten
...
The kittens framework did not exist when icat was first written.
2018-05-09 20:26:30 +05:30
Kovid Goyal
6d038f5cdf
Pass the image manager to the render code
2018-05-09 20:12:39 +05:30
Kovid Goyal
27feccba39
diff: More work on image support
2018-05-09 19:41:37 +05:30
Kovid Goyal
2e69b904da
diff: More work on images
2018-05-09 14:06:15 +05:30
Kovid Goyal
683e5a4754
DRYer
2018-05-09 11:32:09 +05:30
Kovid Goyal
d51a424b98
diff: Start work on image display
2018-05-09 10:25:53 +05:30
Kovid Goyal
b9fa8dbe42
DRYer
2018-05-09 09:28:38 +05:30
Kovid Goyal
3820c46801
Ensure there is a blank line before each new item
2018-05-09 08:33:24 +05:30
Kovid Goyal
b663160bc2
Fix rendering of binary files
2018-05-09 08:17:52 +05:30
Kovid Goyal
a65c807a4a
diff: Add keyboard shortcuts to got to next/previous change
2018-05-09 08:12:40 +05:30
Kovid Goyal
3a1f85cb69
diff: Make the diff implementation configurable
2018-05-08 23:32:21 +05:30
Kovid Goyal
196bd9c22b
Allow setting the number of context lines in diff.conf
2018-05-08 23:17:40 +05:30
Kovid Goyal
9bf2087b55
Better error message when pygments style is not found
2018-05-08 23:13:50 +05:30
Kovid Goyal
51e589c7e6
diff: Add a option for pygments style
2018-05-08 23:08:20 +05:30
Kovid Goyal
7365ed9b05
diff: Better title rendering
2018-05-08 23:02:00 +05:30
Kovid Goyal
9cb7a6b2c7
...
2018-05-08 22:50:00 +05:30
Kovid Goyal
9ff7eae1af
diff: Add an option to control syntax aliases
2018-05-08 22:46:25 +05:30
Kovid Goyal
61e1b74434
Highlight .pyj files as python
2018-05-08 22:32:34 +05:30
Kovid Goyal
324c223d54
diff kitten: keyboard shortcuts to change the number of lines of context
2018-05-08 22:19:50 +05:30
Kovid Goyal
96793a296c
diff kitten has working syntax highlighting
2018-05-08 14:48:01 +05:30
Kovid Goyal
7b1626a38f
Ensure highlighting is run only once
2018-05-08 09:20:36 +05:30
Kovid Goyal
09a3a3dafb
More work on the diff kitten
2018-05-08 08:43:41 +05:30
Kovid Goyal
03256d8ac9
Code to integrate with pygments
2018-05-07 13:30:59 +05:30
Kovid Goyal
23ee6b3109
More work on the diff kitten
2018-05-06 16:25:04 +05:30
Kovid Goyal
d133ffac25
Make using tui.operations more convenient
2018-05-06 15:34:11 +05:30
Kovid Goyal
ffc6e65392
Implement scrolling for the diff kitten
2018-05-06 14:41:10 +05:30
Kovid Goyal
d61086907d
Add a global debug function to the kittens
2018-05-06 13:48:40 +05:30
Kovid Goyal
5b58c2892d
Rename module
2018-05-06 10:35:01 +05:30
Kovid Goyal
67379c67cc
More work on the diff kitten
2018-05-05 13:38:28 +05:30
Kovid Goyal
f5c713b118
More work on the diff kitten
2018-05-05 09:45:35 +05:30
Kovid Goyal
5efa26a98d
Micro-optimization
2018-05-04 15:48:58 +05:30
Kovid Goyal
51d2c01bc1
Highlight changed in individual lines in chunks that have the same number of adds/removes
2018-05-04 15:35:11 +05:30
Kovid Goyal
be9d876997
find common prefix and suffix of two strings
2018-05-03 20:15:28 +05:30
Kovid Goyal
866b53f384
More work on the diff kitten
2018-05-03 18:05:55 +05:30
Kovid Goyal
93ff651d9e
...
2018-05-02 15:52:10 +05:30
Kovid Goyal
bec0f02b11
More work on the diff kitten
2018-05-02 15:26:47 +05:30
Kovid Goyal
0721951c79
Add hunk title lines
2018-05-02 09:47:24 +05:30
Kovid Goyal
0b93b85cf2
Dont use case range in names.h as it prevents compilation with Visual Studio
2018-05-01 11:27:10 +05:30
Kovid Goyal
f7001ea068
Fix character names for control characters not being read from unicode database
...
Also allow unicode_names.c to be compiled with python 2 so I can re-use
it in calibre.
2018-05-01 10:13:58 +05:30
Kovid Goyal
4760580d1c
More work on the diff kitten
2018-04-29 08:07:03 +05:30
Kovid Goyal
8fa492e0ee
More work on the diff kitten
2018-04-28 14:07:24 +05:30
Kovid Goyal
f68f8bf9c9
macOS: Fix changing tab title and kitty shell not working
...
I forgot that Apple has its own special snowflake readline variant.
Fixes #494
2018-04-27 15:16:26 +05:30
Kovid Goyal
84ab0f5062
More work on the diff kitten
2018-04-26 08:01:12 +05:30
Kovid Goyal
d54b58d2f3
...
2018-04-25 19:50:40 +05:30
Kovid Goyal
0be0963dc7
Utility method to truncate formatted lines to specified width
2018-04-25 19:34:04 +05:30
Kovid Goyal
61a2360df5
hints kitten: Detect bracketed URLs and dont include the closing bracket in the URL.
2018-04-25 14:33:37 +05:30
Kovid Goyal
316e7cb9f5
Also use cwd of child when opening programs via the hints kitten
2018-04-25 09:07:35 +05:30
Kovid Goyal
7a543fac86
Wire up color handling in the diff kitten
2018-04-24 10:58:15 +05:30
Kovid Goyal
5c4b14468c
Apply default colors in diff kitten
2018-04-24 10:33:18 +05:30
Kovid Goyal
0b99bb534f
Unicode input: When searching by name search for prefix matches as well as whole word matches
...
So now hori matches both "hori" and "horizontal". Switched to a
prefix-trie internally.
2018-04-24 07:45:20 +05:30
Kovid Goyal
92ca8ab9cc
Fix #482
2018-04-23 07:19:40 +05:30
Kovid Goyal
b5da109e7f
Wire up config infrastructure for diff kitten
2018-04-22 21:44:47 +05:30
Kovid Goyal
20c42ab519
tui: Allow handlers to finalize() as well as initialize()
2018-04-22 13:14:25 +05:30
Kovid Goyal
8bbc2b82d4
More work on the diff kitten
2018-04-22 13:05:58 +05:30
Kovid Goyal
6929358976
More work on the diff kitten
2018-04-21 15:45:16 +05:30
Kovid Goyal
cd25abc49f
...
2018-04-20 22:06:42 +05:30
Kovid Goyal
92bb6e293a
Add threaded job infrastructure to tui
2018-04-20 21:12:10 +05:30
Kovid Goyal
d5907a1bf9
More work on the diff kitten
2018-04-19 10:26:14 +05:30
Kovid Goyal
0a8dc4be0a
Start work on the diff kitten
2018-04-17 17:43:56 +05:30
Kovid Goyal
ba177c61bc
...
2018-04-16 16:46:42 +05:30
Kovid Goyal
52f4e81d59
hints kitten: Reverse order of hints
...
Gives hints at the bottom of the screen smaller numbers. In
non-fullscreen usage matches closer to the bottom are more likely to be
the ones the user is looking for. Fixes #460
2018-04-14 23:07:53 +05:30
Kovid Goyal
1056ab1b81
Store marks in the index map
2018-04-14 23:01:49 +05:30
Kovid Goyal
339a2e0800
Add a word select type to the hints kitten
2018-04-12 13:49:12 +05:30
Kovid Goyal
c95d1393cc
Add some more default keybindings for the hints kitten
2018-04-12 13:01:16 +05:30
Kovid Goyal
6a090ac740
Add a --type argument to hints kitten
...
Allows addition of more sophisticated types of matches later.
2018-04-12 10:30:32 +05:30
Kovid Goyal
3c7236557c
hints: Use --program=@ to copy to clipboard
2018-04-12 10:16:48 +05:30
Kovid Goyal
83a3d99824
Make --help work for all kittens
2018-04-12 09:33:50 +05:30
Kovid Goyal
808750a76a
Rename url_hints to just hints
2018-04-12 09:23:48 +05:30
Kovid Goyal
038248f55d
Remove unnecessary handling of passed in files to url_hints
2018-04-12 09:04:54 +05:30
Kovid Goyal
21b7bf6009
url_hints: Allow using a group to ignore prefix/suffix when matching via regex
2018-04-12 08:54:36 +05:30
Kovid Goyal
805baad9cd
More appropriate message when URLs not found
2018-04-12 07:27:40 +05:30
Kovid Goyal
56dd442e2c
Flush output streams on kitten end
2018-04-11 20:24:39 +05:30
Kovid Goyal
cb7fff6986
Refactor the ask kitten to use the new API
2018-04-11 14:40:58 +05:30
Kovid Goyal
75b5130d96
Allow the URL hints kitten to insert the selected URL into the terminal
2018-04-11 13:22:07 +05:30
Kovid Goyal
2cf8c6aea7
Refactor the kittens framework
...
Make it possible to perform arbitrary actions with the kittens output
and also allow running kittens from standalone python files.
2018-04-11 13:09:31 +05:30
alexander white
f99e368831
Fixed crash on tab-completing without any search results.
2018-04-07 14:10:16 -04:00
Kovid Goyal
58e33e2512
URL hints: Exclude trailing punctuation from URLs
2018-04-04 08:53:12 +05:30
Kovid Goyal
90a4b4f859
URL hints kitten: Open the URL from within the kitty process. This ensures that the behavior of the program used to open the URL is the same as when ctrl+shift clicking URLs. Fixes #424
2018-04-01 16:48:07 +05:30
Kovid Goyal
be8f2b8106
Create a shortcut to set the tab title
...
No longer need to use remote control just to change tab titles.
2018-03-25 09:55:02 +05:30
Kovid Goyal
71db024a3b
Add history based completion to the ask kitten
2018-03-24 11:49:34 +05:30
Kovid Goyal
3790af6897
Basic ask kitten
2018-03-23 18:03:43 +05:30
Kovid Goyal
527255e3a1
Fix compilation with gcc 8
...
Apparently some nitwit Linux distros have made an unreleased compiler
their default compiler. Fixes #376
Fixes various new warnings that GCC 8 issues
2018-03-12 10:38:12 +05:30
Kovid Goyal
51b6b325b9
Add a keyboard shortcut to edit the kitty config file easily
...
Fixes #366
2018-03-09 17:57:09 +05:30
Kovid Goyal
3b34821c86
Report unhandled exceptions during loop initialization in the unicode input kitten as well
2018-03-08 13:57:13 +05:30
Kovid Goyal
eaea0b16b5
Fix URL hints not working on macOS
...
Fixes #363
2018-03-08 13:38:16 +05:30
Kovid Goyal
1b84064e5f
...
2018-03-08 13:01:35 +05:30
Kovid Goyal
dd128a99ac
Report unahndled exceptions when starting loop in URL hints kitten
2018-03-08 12:58:54 +05:30
Kovid Goyal
e8f3f00792
Handle cols being zero
2018-02-27 18:48:48 +05:30
Kovid Goyal
11e85ac703
Swapped unicode input name and hex mode prompt strings
2018-02-24 14:51:49 +05:30
Kovid Goyal
97b4256ba4
Remove unused code
2018-02-14 18:50:52 +05:30
Kovid Goyal
e4b643fdaf
Show a nice message when no URLs are found
2018-02-14 18:36:57 +05:30
Kovid Goyal
51e3e9997c
Allow clicking URLs via keybaord hints by pressing ctrl+shift+e
2018-02-14 17:18:57 +05:30
Kovid Goyal
ad706f9924
Make the list of URL prefixes configurable
2018-02-14 12:48:44 +05:30
Kovid Goyal
57cf789c75
Finish up the URL hints kitten
2018-02-14 12:34:01 +05:30
Kovid Goyal
62174fdbcc
DRYer
2018-02-14 11:19:58 +05:30
Kovid Goyal
0c3257b6b9
Start work on url hints kitten
2018-02-14 11:01:17 +05:30
Kovid Goyal
4bbf5c0bc9
Allow choosing a match by index in the search by name panel as well
2018-02-13 11:25:45 +05:30
Kovid Goyal
b0820f6e13
Use . instead of r for the index char
2018-02-13 11:10:35 +05:30
Kovid Goyal
b0f5d8dfdc
Fix table row generation for non-name unicode input panels
2018-02-13 10:50:06 +05:30
Kovid Goyal
67e0d3723a
Implement favorites for unicode input
2018-02-13 10:33:55 +05:30
Kovid Goyal
a36f4a4670
Add a Emoji panel to the unicode input kitten
2018-02-13 09:06:39 +05:30
Kovid Goyal
dab852c412
Implement searching for unicode characters by name
2018-02-12 14:08:54 +05:30
Kovid Goyal
193ac6cd81
Forgot to remove from recent when adding to top of list
2018-02-12 12:39:02 +05:30
Kovid Goyal
34ca8419bb
Finish chose unicode symbol by recently used
2018-02-12 10:19:29 +05:30
Kovid Goyal
6094aabe26
...
2018-02-12 10:19:29 +05:30
Kovid Goyal
3363a9459b
Implement drawing of titlebar, remembering of mode and fix various bugs in tui
2018-02-12 10:19:29 +05:30
Kovid Goyal
f0d4ad16d2
Work on search by name in unicode input
2018-02-12 10:19:29 +05:30
Kovid Goyal
e119ed0daa
Ignore harmless KeyError while modifying selectors
2018-02-09 20:20:18 +05:30
Kovid Goyal
8c18486836
Module with all the data for unicode entry by character name
2018-02-09 19:56:25 +05:30
Kovid Goyal
3068846d8f
Implement using Ctrl+Shift+u to input unicode
...
Fixes #302
2018-02-08 22:47:17 +05:30
Kovid Goyal
194454715f
Basic unicode input works
2018-02-08 22:16:39 +05:30
Kovid Goyal
d19f9e5b96
Fix error handling in tui.loop
2018-02-08 12:33:27 +05:30
Kovid Goyal
213a223861
Typo in incremental decoder init
2018-02-08 11:56:34 +05:30
Kovid Goyal
ef9a24932f
Start work on unicode input kitten
2018-02-08 11:00:57 +05:30
Kovid Goyal
0f63d1bfa7
...
2018-02-07 22:41:03 +05:30
Kovid Goyal
66a897cc80
Add interrupt and eot callbacks
2018-02-07 19:46:53 +05:30
Kovid Goyal
e3b4919c17
Finish up tui.Loop
2018-02-07 13:30:34 +05:30
Kovid Goyal
168bc58635
The kittens learn about mice
2018-02-07 12:40:04 +05:30
Kovid Goyal
f4f0b8fd5f
Kittens learn about bracketed paste
2018-02-07 10:39:05 +05:30
Kovid Goyal
35f1658f4a
Key and text handler for the kittens
2018-02-06 20:58:46 +05:30
Kovid Goyal
22cf67b407
More work on tui.loop
2018-02-06 20:08:28 +05:30
Kovid Goyal
452ff02b15
Oops added extra file in previous commit
2018-02-04 20:34:02 +05:30
Kovid Goyal
c2cb43cc07
Framework for kittens
2018-02-04 20:23:52 +05:30