Kovid Goyal
85ed5c1515
Remove unnecessary conditional operators
2017-09-16 09:43:43 +05:30
Kovid Goyal
b7a5c064c2
Fix some Alt based shortcuts not working
2017-09-16 09:32:17 +05:30
Kovid Goyal
34084e7ab5
Neaten up keys.h
2017-09-16 09:16:30 +05:30
Kovid Goyal
728f33700a
Fine tune the artificial delays in the render loop
...
There are now two numbers, repaint_delay and input_delay
that control how often the screen is repainted and how frequently
input received from the child process is processed.
This halves the CPU usage in intensive cases such as scrolling
a file in less. The CPU usage of kitty + X when scrolling is now
significantly lower than all the other terminals on my system.
MROAWR!
...
2017-09-16 08:20:23 +05:30
Kovid Goyal
43ebddc28f
Fix writing to child causing excessive CPU usage
...
Couple of bugs combined.
2017-09-15 21:56:20 +05:30
Kovid Goyal
c5e989bc94
Move the key handler to C
2017-09-15 21:46:00 +05:30
Kovid Goyal
a4d71bcf5c
Move the text input callback to C
2017-09-15 18:33:45 +05:30
Kovid Goyal
ddbe0703a3
Remove unused code
2017-09-15 18:10:17 +05:30
Kovid Goyal
b2c7272af1
Store key combos that need special handling in a table for fast lookup
2017-09-15 18:06:26 +05:30
Kovid Goyal
0423c55dc1
Move a few externs into appropriate header files
2017-09-15 11:56:08 +05:30
Kovid Goyal
0b656246fd
Fix cursor width incorrect after scrolling
2017-09-15 11:44:16 +05:30
Kovid Goyal
28430a4104
Fix wide chars not being rendered
2017-09-15 11:43:05 +05:30
Kovid Goyal
f0a9f32d0a
Fix cursor not being rendered on empty cells
2017-09-15 11:08:42 +05:30
Kovid Goyal
44c897a61a
Translate key presses to bytes using a lookup table
2017-09-15 10:45:27 +05:30
Kovid Goyal
b5af266b87
A spot of refactoring
2017-09-15 10:45:27 +05:30
Kovid Goyal
9989363ecd
Make the URL highlight color configurable
2017-09-15 10:45:27 +05:30
Kovid Goyal
53ea5c678d
Highlight links with a underline on mouseover
2017-09-15 10:45:27 +05:30
Kovid Goyal
464291bbb1
Port click on URL code to C
2017-09-15 10:45:27 +05:30
Kovid Goyal
ed3427f349
Dont use the python unicodedata module as we use libunistring
...
No sense in loading two hude unicode datasets into memory
2017-09-15 10:45:27 +05:30
Kovid Goyal
21accfe114
Send mouse events to child directly in C
2017-09-15 10:45:26 +05:30
Kovid Goyal
ee0a539e01
Reclaim write buffer space once no longer needed
2017-09-15 10:45:26 +05:30
Kovid Goyal
d236955dfb
...
2017-09-15 10:45:26 +05:30
Kovid Goyal
32a11d9d21
Avoid mallocs when writing small amounts of data to the child
2017-09-15 10:45:26 +05:30
Kovid Goyal
43c4c71abd
Port mouse event encoding code to C
2017-09-15 10:45:26 +05:30
Kovid Goyal
b9ac13c379
Move the scroll event handler to C
2017-09-15 10:45:26 +05:30
Kovid Goyal
11bb21e8a4
Remove unused code
2017-09-15 10:45:26 +05:30
Kovid Goyal
4bfe7e1069
Fix incorrect cell co-ordinates when more than one window visible in the layout
2017-09-15 10:45:26 +05:30
Kovid Goyal
4feaf13556
Implement drag scrolling in C
2017-09-15 10:45:26 +05:30
Kovid Goyal
a27004da35
Port drag select to C
2017-09-15 10:45:26 +05:30
Kovid Goyal
cf6894d74f
Port multi-click handler to C
2017-09-15 10:45:25 +05:30
Kovid Goyal
a921180224
Port middle-click-to-paste to C
2017-09-15 10:45:25 +05:30
Kovid Goyal
7e4948be10
Port switch focus on click code to C
2017-09-15 10:45:25 +05:30
Kovid Goyal
04a45babfb
DRYer
2017-09-15 10:45:25 +05:30
Kovid Goyal
1c1d0a4e91
Port mouse cursor change over hyperlinks to C
2017-09-15 10:45:25 +05:30
Kovid Goyal
271b623f82
More URL detection tests
2017-09-15 10:45:25 +05:30
Kovid Goyal
88d896e745
Move function to detect URLs into C code
2017-09-15 10:45:25 +05:30
Kovid Goyal
745b6222c2
Start work on migrating the mouse handlers to C
2017-09-15 10:45:25 +05:30
Kovid Goyal
42329e5d46
Merge the char_grid and window modules
2017-09-15 10:45:25 +05:30
Kovid Goyal
240c683504
DRYer
2017-09-15 10:45:24 +05:30
Kovid Goyal
c683725434
Get rid of the timers infrastructure
...
It is not needed with a pure state machine.
Note that drag scrolling still has to be ported from using
timers.
2017-09-15 10:45:24 +05:30
Kovid Goyal
f3cd0a4966
...
2017-09-15 10:45:24 +05:30
Kovid Goyal
573dd8c99e
...
2017-09-15 10:45:24 +05:30
Kovid Goyal
6d8b59cb61
Track window and application titles in C
...
Allows removing of the last bit fo python from the render loop
2017-09-15 10:45:24 +05:30
Kovid Goyal
c41ede4d20
Dont use a timer for mouse hiding
2017-09-15 10:45:24 +05:30
Kovid Goyal
13ac050bf8
Move cursor render call to C
2017-09-15 10:45:24 +05:30
Kovid Goyal
6e4b977128
Track application focus state in global state
2017-09-15 10:45:24 +05:30
Kovid Goyal
e6df82b255
Move the char grid render call into C
2017-09-15 10:45:24 +05:30
Kovid Goyal
943a1575ad
Move render call for tab bar to C code
2017-09-15 10:45:24 +05:30
Kovid Goyal
2e0cbb88bb
Call draw_borders() directly from C
2017-09-15 10:45:23 +05:30
Kovid Goyal
8e379df24f
Ensure the visual bell is cleared
...
UI thread must wakeup after visual bell duration
2017-09-15 10:45:23 +05:30