mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-11 01:28:19 +03:00
Merge branch 'master' of https://github.com/olzhasar/kitty
This commit is contained in:
commit
80fb6f0f12
@ -8,7 +8,7 @@ a minimum, kitty version, OS and OS version, kitty config (ideally a minimal
|
||||
config to reproduce the issue with).
|
||||
|
||||
Note that bugs and feature requests are often closed quickly as they are either
|
||||
fixed or deemed wontfix/invalid. In my experience, this is the only scaleable way to
|
||||
fixed or deemed wontfix/invalid. In my experience, this is the only scalable way to
|
||||
manage a bug tracker. Feel free to continue to post to a closed bug report
|
||||
if you would like to discuss the issue further. Being closed does not mean you
|
||||
will not get any more responses.
|
||||
|
@ -18,7 +18,7 @@ following dependencies are installed first.
|
||||
If you are making small changes only to the Python parts of kitty, there is
|
||||
no need to build kitty at all, instead, assuming you have installed the
|
||||
official kitty binaries, you can simply set the :envvar:`KITTY_DEVELOP_FROM`
|
||||
enviroment variable to point to the directory into which you have checked out
|
||||
environment variable to point to the directory into which you have checked out
|
||||
the kitty source code. kitty will then load its Python code from there. You
|
||||
should use a version of the source that matches the binary version as closely
|
||||
as possible, since the two are tightly coupled.
|
||||
|
@ -508,7 +508,7 @@ Detailed list of changes
|
||||
|
||||
- A new value :code:`last_reported` for :option:`launch --cwd` to use the current working directory last reported by the program running in the terminal
|
||||
|
||||
- macOS: When using Apple's less as the pager for viewing scrollback strip out OSC codes as it cant parse them (:iss:`4788`)
|
||||
- macOS: When using Apple's less as the pager for viewing scrollback strip out OSC codes as it can't parse them (:iss:`4788`)
|
||||
|
||||
- diff kitten: Fix incorrect rendering in rare circumstances when scrolling after changing the context size (:iss:`4831`)
|
||||
|
||||
@ -769,7 +769,7 @@ Detailed list of changes
|
||||
- A new remote control command to :program:`visually select a window <kitty @
|
||||
select-window>` (:iss:`4165`)
|
||||
|
||||
- Add support for reporting mouse events with pixel co-ordinates using the
|
||||
- Add support for reporting mouse events with pixel coordinates using the
|
||||
``SGR_PIXEL_PROTOCOL`` introduced in xterm 359
|
||||
|
||||
- When programs ask to read from the clipboard prompt, ask the user to allow
|
||||
@ -933,7 +933,7 @@ Detailed list of changes
|
||||
sizes (:iss:`3896`)
|
||||
|
||||
- Fix shift+middle click to paste sending a mouse press event but no release
|
||||
event which breaks some applications that grab the mouse but cant handle
|
||||
event which breaks some applications that grab the mouse but can't handle
|
||||
mouse events (:iss:`3902`)
|
||||
|
||||
- macOS: When the language is set to English and the country to one for which
|
||||
@ -1610,7 +1610,7 @@ Detailed list of changes
|
||||
- Fix image leaving behind a black rectangle when switch away and back to
|
||||
alternate screen (:iss:`2901`)
|
||||
|
||||
- Fix one pixel mis-alignment of rounded corners when either the cell
|
||||
- Fix one pixel misalignment of rounded corners when either the cell
|
||||
dimensions or the thickness of the line is an odd number of pixels
|
||||
(:iss:`2907`)
|
||||
|
||||
|
@ -150,7 +150,7 @@ other characters must be stripped out from the id by the terminal emulator
|
||||
before retransmitting it.
|
||||
|
||||
Note that when using a terminal multiplexer it is possible for two different
|
||||
programs to tread on each others clipboard requests. This is fundamentally
|
||||
programs to treat on each others clipboard requests. This is fundamentally
|
||||
unavoidable since the system clipboard is a single global shared resource.
|
||||
However, there is an additional complication where responses form this protocol
|
||||
could get lost if, for instance, multiple write requests are received
|
||||
|
@ -6,7 +6,7 @@ Glossary
|
||||
.. glossary::
|
||||
|
||||
os_window
|
||||
kitty has two kinds of windows. Operating System windows, refered to as :term:`OS
|
||||
kitty has two kinds of windows. Operating System windows, referred to as :term:`OS
|
||||
Window <os_window>`, and *kitty windows*. An OS Window consists of one or more kitty
|
||||
:term:`tabs <tab>`. Each tab in turn consists of one or more *kitty
|
||||
windows* organized in a :term:`layout`.
|
||||
@ -22,7 +22,7 @@ Glossary
|
||||
the terminal. See :doc:`layouts` for details.
|
||||
|
||||
window
|
||||
kitty has two kinds of windows. Operating System windows, refered to as :term:`OS
|
||||
kitty has two kinds of windows. Operating System windows, referred to as :term:`OS
|
||||
Window <os_window>`, and *kitty windows*. An OS Window consists of one or more kitty
|
||||
:term:`tabs <tab>`. Each tab in turn consists of one or more *kitty
|
||||
windows* organized in a :term:`layout`.
|
||||
@ -93,7 +93,7 @@ Variables that influence kitty behavior
|
||||
.. envvar:: KITTY_WAYLAND_DETECT_MODIFIERS
|
||||
|
||||
When set to a non-empty value, kitty attempts to autodiscover XKB modifiers
|
||||
under Wayland. This is useful if using non-standard modifers like hyper. It
|
||||
under Wayland. This is useful if using non-standard modifiers like hyper. It
|
||||
is possible for the autodiscovery to fail; the default Wayland XKB mappings
|
||||
are used in this case. See :pull:`3943` for details.
|
||||
|
||||
|
@ -108,7 +108,7 @@ code to demonstrate its use
|
||||
#!/bin/bash
|
||||
|
||||
# This uses the kitten standalone binary from kitty to get the pixel sizes
|
||||
# since we cant do IOCTLs directly. Fortunately, kitten is a static exe
|
||||
# since we can't do IOCTLs directly. Fortunately, kitten is a static exe
|
||||
# pre-built for every Unix like OS under the sun.
|
||||
|
||||
builtin read -r rows cols < <(command stty size)
|
||||
|
@ -279,7 +279,7 @@ The terminal will reply with::
|
||||
The program can also push/pop the current flags onto a stack in the
|
||||
terminal with::
|
||||
|
||||
CSI > flags u # for push, if flags ommitted default to zero
|
||||
CSI > flags u # for push, if flags omitted default to zero
|
||||
CSI < number u # to pop number entries, defaulting to 1 if unspecified
|
||||
|
||||
Terminals should limit the size of the stack as appropriate, to prevent
|
||||
|
@ -62,7 +62,7 @@ the need for this kitten.
|
||||
|
||||
|
||||
.. note::
|
||||
While you can pass any of ripgrep's comand line options to the kitten and
|
||||
While you can pass any of ripgrep's command line options to the kitten and
|
||||
they will be forwarded to :program:`rg`, do not use options that change the
|
||||
output formatting as the kitten works by parsing the output from ripgrep.
|
||||
The unsupported options are: :code:`--context-separator`,
|
||||
|
@ -157,7 +157,7 @@ define a few extra key bindings in :file:`kitty.conf`::
|
||||
# one above the other if the existing window is tall.
|
||||
map f4 launch --location=split
|
||||
|
||||
# Rotate the current split, chaging its split axis from vertical to
|
||||
# Rotate the current split, changing its split axis from vertical to
|
||||
# horizontal or vice versa
|
||||
map f7 layout_action rotate
|
||||
|
||||
|
@ -283,7 +283,7 @@ are matched::
|
||||
map f1 remote_control !focus-window --match XXXXXX
|
||||
|
||||
.. note:: You do not need :opt:`allow_remote_control` to use these mappings,
|
||||
as they are not actual remote programs, but are simply a way to resuse the
|
||||
as they are not actual remote programs, but are simply a way to reuse the
|
||||
remote control infrastructure via keybings.
|
||||
|
||||
|
||||
|
@ -298,7 +298,7 @@ Manual shell integration
|
||||
----------------------------
|
||||
|
||||
The automatic shell integration is designed to be minimally intrusive, as such
|
||||
it wont work for sub-shells, terminal multiplexers, containers, etc.
|
||||
it won't work for sub-shells, terminal multiplexers, containers, etc.
|
||||
For such systems, you should setup manual shell integration by adding some code
|
||||
to your shells startup files to load the shell integration script.
|
||||
|
||||
|
@ -826,7 +826,7 @@ int _glfwPlatformInit(void)
|
||||
if (!_glfw.ignoreOSKeyboardProcessing) {
|
||||
// first check if there is a global menu bar shortcut
|
||||
if ([[NSApp mainMenu] performKeyEquivalent:event]) {
|
||||
debug_key("keyDown triggerred global menu bar action ignoring\n");
|
||||
debug_key("keyDown triggered global menu bar action ignoring\n");
|
||||
last_keydown_shortcut_event.virtual_key_code = [event keyCode];
|
||||
last_keydown_shortcut_event.input_source_switch_modifiers = 0;
|
||||
last_keydown_shortcut_event.timestamp = [event timestamp];
|
||||
@ -835,7 +835,7 @@ int _glfwPlatformInit(void)
|
||||
// now check if there is a useful apple shortcut
|
||||
int global_shortcut = is_active_apple_global_shortcut(event);
|
||||
if (is_useful_apple_global_shortcut(global_shortcut)) {
|
||||
debug_key("keyDown triggerred global macOS shortcut ignoring\n");
|
||||
debug_key("keyDown triggered global macOS shortcut ignoring\n");
|
||||
last_keydown_shortcut_event.virtual_key_code = [event keyCode];
|
||||
// record the modifier keys if switching to the next input source
|
||||
last_keydown_shortcut_event.input_source_switch_modifiers = (global_shortcut == kSHKSelectNextSourceInInputMenu) ? USEFUL_MODS([event modifierFlags]) : 0;
|
||||
@ -844,7 +844,7 @@ int _glfwPlatformInit(void)
|
||||
}
|
||||
// check for JIS keyboard layout function keys
|
||||
if (is_apple_jis_layout_function_key(event)) {
|
||||
debug_key("keyDown triggerred JIS layout function key ignoring\n");
|
||||
debug_key("keyDown triggered JIS layout function key ignoring\n");
|
||||
last_keydown_shortcut_event.virtual_key_code = [event keyCode];
|
||||
last_keydown_shortcut_event.input_source_switch_modifiers = 0;
|
||||
last_keydown_shortcut_event.timestamp = [event timestamp];
|
||||
@ -865,7 +865,7 @@ int _glfwPlatformInit(void)
|
||||
if (last_keydown_shortcut_event.virtual_key_code != 0xffff && last_keydown_shortcut_event.virtual_key_code == [event keyCode]) {
|
||||
// ignore as the corresponding key down event triggered a menu bar or macOS shortcut
|
||||
last_keydown_shortcut_event.virtual_key_code = 0xffff;
|
||||
debug_key("keyUp ignored as corresponds to previous keyDown that trigerred a shortcut\n");
|
||||
debug_key("keyUp ignored as corresponds to previous keyDown that triggered a shortcut\n");
|
||||
return nil;
|
||||
}
|
||||
NSWindow *kw = [NSApp keyWindow];
|
||||
|
@ -355,7 +355,7 @@ requestRenderFrame(_GLFWwindow *w, GLFWcocoarenderframefun callback) {
|
||||
if (!dl->first_unserviced_render_frame_request_at) dl->first_unserviced_render_frame_request_at = now;
|
||||
if (!CVDisplayLinkIsRunning(dl->displayLink)) CVDisplayLinkStart(dl->displayLink);
|
||||
else if (now - dl->first_unserviced_render_frame_request_at > s_to_monotonic_t(1ll)) {
|
||||
// display link is stuck need to recreate it because Apple cant even
|
||||
// display link is stuck need to recreate it because Apple can't even
|
||||
// get a simple timer right
|
||||
CVDisplayLinkRelease(dl->displayLink); dl->displayLink = nil;
|
||||
dl->first_unserviced_render_frame_request_at = now;
|
||||
@ -2561,7 +2561,7 @@ bool _glfwPlatformToggleFullscreen(_GLFWwindow* w, unsigned int flags) {
|
||||
NSWindowStyleMask sm = [window styleMask];
|
||||
if (traditional) {
|
||||
if (@available(macOS 10.15.7, *)) {
|
||||
// As of Big Turd NSWindowStyleMaskFullScreen is no longer useable
|
||||
// As of Big Turd NSWindowStyleMaskFullScreen is no longer usable
|
||||
// Also no longer compatible after a minor release of macOS 10.15.7
|
||||
if (!w->ns.in_traditional_fullscreen) {
|
||||
w->ns.pre_full_screen_style_mask = sm;
|
||||
@ -2589,7 +2589,7 @@ bool _glfwPlatformToggleFullscreen(_GLFWwindow* w, unsigned int flags) {
|
||||
}
|
||||
// Changing the style mask causes the first responder to be cleared
|
||||
[window makeFirstResponder:w->ns.view];
|
||||
// If the dock and menubar are hidden going from maximized to fullscreen doesnt change the window size
|
||||
// If the dock and menubar are hidden going from maximized to fullscreen doesn't change the window size
|
||||
// and macOS forgets to trigger windowDidResize, so call it ourselves
|
||||
NSNotification *notification = [NSNotification notificationWithName:NSWindowDidResizeNotification object:window];
|
||||
[w->ns.delegate performSelector:@selector(windowDidResize:) withObject:notification afterDelay:0];
|
||||
|
4
glfw/xkb-compat-shim.h
vendored
4
glfw/xkb-compat-shim.h
vendored
@ -371,7 +371,7 @@ static const struct codepair keysymtab[] = {
|
||||
{ 0x07c8, 0x0398 }, /* Greek_THETA Θ GREEK CAPITAL LETTER THETA */
|
||||
{ 0x07c9, 0x0399 }, /* Greek_IOTA Ι GREEK CAPITAL LETTER IOTA */
|
||||
{ 0x07ca, 0x039a }, /* Greek_KAPPA Κ GREEK CAPITAL LETTER KAPPA */
|
||||
{ 0x07cb, 0x039b }, /* Greek_LAMBDA Λ GREEK CAPITAL LETTER LAMDA */
|
||||
{ 0x07cb, 0x039b }, /* Greek_LAMBDA Λ GREEK CAPITAL LETTER LAMBDA */
|
||||
{ 0x07cc, 0x039c }, /* Greek_MU Μ GREEK CAPITAL LETTER MU */
|
||||
{ 0x07cd, 0x039d }, /* Greek_NU Ν GREEK CAPITAL LETTER NU */
|
||||
{ 0x07ce, 0x039e }, /* Greek_XI Ξ GREEK CAPITAL LETTER XI */
|
||||
@ -395,7 +395,7 @@ static const struct codepair keysymtab[] = {
|
||||
{ 0x07e8, 0x03b8 }, /* Greek_theta θ GREEK SMALL LETTER THETA */
|
||||
{ 0x07e9, 0x03b9 }, /* Greek_iota ι GREEK SMALL LETTER IOTA */
|
||||
{ 0x07ea, 0x03ba }, /* Greek_kappa κ GREEK SMALL LETTER KAPPA */
|
||||
{ 0x07eb, 0x03bb }, /* Greek_lambda λ GREEK SMALL LETTER LAMDA */
|
||||
{ 0x07eb, 0x03bb }, /* Greek_lambda λ GREEK SMALL LETTER LAMBDA */
|
||||
{ 0x07ec, 0x03bc }, /* Greek_mu μ GREEK SMALL LETTER MU */
|
||||
{ 0x07ed, 0x03bd }, /* Greek_nu ν GREEK SMALL LETTER NU */
|
||||
{ 0x07ee, 0x03be }, /* Greek_xi ξ GREEK SMALL LETTER XI */
|
||||
|
@ -221,7 +221,7 @@ func main(cmd *cli.Command, o *Options, args []string) (rc int, err error) {
|
||||
}
|
||||
}
|
||||
if passthrough_mode != no_passthrough {
|
||||
// tmux doesnt allow responses from the terminal so we cant detect if memory or file based transferring is supported
|
||||
// tmux doesn't allow responses from the terminal so we can't detect if memory or file based transferring is supported
|
||||
transfer_by_memory = unsupported
|
||||
transfer_by_file = unsupported
|
||||
transfer_by_stream = supported
|
||||
|
@ -144,7 +144,7 @@ func transmit_file(imgd *image_data, frame_num int, frame *image_frame) (err err
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to convert image data output file: %s to absolute path with error: %w", frame.filename, err)
|
||||
}
|
||||
frame.filename = "" // so it isnt deleted in cleanup
|
||||
frame.filename = "" // so it isn't deleted in cleanup
|
||||
} else {
|
||||
is_temp = true
|
||||
if frame.shm != nil && frame.shm.FileSystemName() != "" {
|
||||
|
@ -489,7 +489,7 @@ func wrap_bootstrap_script(cd *connection_data) {
|
||||
encoded_script = base64.StdEncoding.EncodeToString(utils.UnsafeStringToBytes(cd.bootstrap_script))
|
||||
unwrap_script = `"import base64, sys; eval(compile(base64.standard_b64decode(sys.argv[-1]), 'bootstrap.py', 'exec'))"`
|
||||
} else {
|
||||
// We cant rely on base64 being available on the remote system, so instead
|
||||
// We can't rely on base64 being available on the remote system, so instead
|
||||
// we quote the bootstrap script by replacing ' and \ with \v and \f
|
||||
// also replacing \n and ! with \r and \b for tcsh
|
||||
// finally surrounding with '
|
||||
|
@ -816,7 +816,7 @@ render(monotonic_t now, bool input_read) {
|
||||
// dont respect render frames soon after a resize on Wayland as they cause flicker because
|
||||
// we want to fill the newly resized buffer ASAP, not at compositors convenience
|
||||
if (!global_state.is_wayland || (monotonic() - w->viewport_resized_at) > s_double_to_monotonic_t(1)) {
|
||||
// since we didnt scan the window for animations, force a rescan on next wakeup/render frame
|
||||
// since we didn't scan the window for animations, force a rescan on next wakeup/render frame
|
||||
if (scan_for_animated_images) global_state.check_for_active_animated_images = true;
|
||||
continue;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ serialize_string_tuple(PyObject *src) {
|
||||
if (!pysrc) {
|
||||
PyErr_Clear();
|
||||
DECREF_AFTER_FUNCTION PyObject *u8 = PyUnicode_AsEncodedString(PyTuple_GET_ITEM(src, i), "UTF-8", "ignore");
|
||||
if (!u8) { PyErr_Print(); fatal("couldnt parse command line"); }
|
||||
if (!u8) { PyErr_Print(); fatal("couldn't parse command line"); }
|
||||
ans[i] = calloc(PyBytes_GET_SIZE(u8) + 1, sizeof(char));
|
||||
if (ans[i] == NULL) fatal("Out of memory");
|
||||
memcpy(ans[i], PyBytes_AS_STRING(u8), PyBytes_GET_SIZE(u8));
|
||||
|
@ -245,7 +245,7 @@ class WriteRequest:
|
||||
self.current_leftover_bytes = memoryview(b'')
|
||||
self.max_size = (get_options().clipboard_max_size * 1024 * 1024) if max_size < 0 else max_size
|
||||
self.aliases: Dict[str, str] = {}
|
||||
self.commited = False
|
||||
self.committed = False
|
||||
|
||||
def encode_response(self, status: str = 'OK') -> bytes:
|
||||
ans = f'{self.protocol_type.value};type=write:status={status}'
|
||||
@ -255,9 +255,9 @@ class WriteRequest:
|
||||
return a
|
||||
|
||||
def commit(self) -> None:
|
||||
if self.commited:
|
||||
if self.committed:
|
||||
return
|
||||
self.commited = True
|
||||
self.committed = True
|
||||
cp = get_boss().primary_selection if self.is_primary_selection else get_boss().clipboard
|
||||
if cp.enabled:
|
||||
for alias, src in self.aliases.items():
|
||||
|
@ -229,7 +229,7 @@ def running_in_kitty(set_val: Optional[bool] = None) -> bool:
|
||||
def list_kitty_resources(package: str = 'kitty') -> Iterator[str]:
|
||||
try:
|
||||
if sys.version_info[:2] < (3, 10):
|
||||
raise ImportError('importlib.resources.files() doesnt work with frozen builds on python 3.9')
|
||||
raise ImportError("importlib.resources.files() doesn't work with frozen builds on python 3.9")
|
||||
from importlib.resources import files
|
||||
except ImportError:
|
||||
from importlib.resources import contents
|
||||
@ -241,7 +241,7 @@ def list_kitty_resources(package: str = 'kitty') -> Iterator[str]:
|
||||
def read_kitty_resource(name: str, package_name: str = 'kitty') -> bytes:
|
||||
try:
|
||||
if sys.version_info[:2] < (3, 10):
|
||||
raise ImportError('importlib.resources.files() doesnt work with frozen builds on python 3.9')
|
||||
raise ImportError("importlib.resources.files() doesn't work with frozen builds on python 3.9")
|
||||
from importlib.resources import files
|
||||
except ImportError:
|
||||
from importlib.resources import read_binary
|
||||
|
@ -169,7 +169,7 @@ namespaced_entry_points['edit'] = edit
|
||||
|
||||
def setup_openssl_environment(ext_dir: str) -> None:
|
||||
# Use our bundled CA certificates instead of the system ones, since
|
||||
# many systems come with no certificates in a useable form or have various
|
||||
# many systems come with no certificates in a usable form or have various
|
||||
# locations for the certificates.
|
||||
d = os.path.dirname
|
||||
if 'darwin' in sys.platform.lower():
|
||||
|
@ -439,7 +439,7 @@ def rectircle_equations(
|
||||
) -> Tuple[ParameterizedFunc, ParameterizedFunc]:
|
||||
'''
|
||||
Return two functions, x(t) and y(t) that map the parameter t which must be
|
||||
in the range [0, 1] to x and y co-ordinates in the cell. The rectircle equation
|
||||
in the range [0, 1] to x and y coordinates in the cell. The rectircle equation
|
||||
we use is:
|
||||
|
||||
(|x| / a) ^ (2a / r) + (|y| / a) ^ (2b / r) = 1
|
||||
|
@ -1808,7 +1808,7 @@ make_x11_window_a_dock_window(PyObject *self UNUSED, PyObject *args UNUSED) {
|
||||
int x11_window_id;
|
||||
PyObject *dims;
|
||||
if (!PyArg_ParseTuple(args, "iO!", &x11_window_id, &PyTuple_Type, &dims)) return NULL;
|
||||
if (PyTuple_GET_SIZE(dims) != 12 ) { PyErr_SetString(PyExc_TypeError, "dimesions must be a tuple of length 12"); return NULL; }
|
||||
if (PyTuple_GET_SIZE(dims) != 12 ) { PyErr_SetString(PyExc_TypeError, "dimensions must be a tuple of length 12"); return NULL; }
|
||||
if (!glfwSetX11WindowAsDock) { PyErr_SetString(PyExc_RuntimeError, "Failed to load glfwGetX11Window"); return NULL; }
|
||||
uint32_t dimensions[12];
|
||||
for (Py_ssize_t i = 0; i < 12; i++) dimensions[i] = PyLong_AsUnsignedLong(PyTuple_GET_ITEM(dims, i));
|
||||
|
@ -131,7 +131,7 @@ typedef struct {
|
||||
|
||||
static inline float
|
||||
gl_size(const unsigned int sz, const unsigned int viewport_size) {
|
||||
// convert pixel sz to OpenGL co-ordinate system.
|
||||
// convert pixel sz to OpenGL coordinate system.
|
||||
const float px = 2.f / viewport_size;
|
||||
return px * sz;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@
|
||||
* with the difference in last parameter.
|
||||
* Note the islt macro/routine (it receives pointers to two elements):
|
||||
* the only condition of interest is whenever one element is less than
|
||||
* another, no other conditions (greather than, equal to etc) are tested.
|
||||
* another, no other conditions (greater than, equal to etc) are tested.
|
||||
* So, for example, to define integer sort, use:
|
||||
* #define islt(a,b) ((*a)<(*b))
|
||||
* QSORT(int, arr, n, islt)
|
||||
@ -149,7 +149,7 @@ typedef struct {
|
||||
\
|
||||
/* Don't declare two variables of type QSORT_TYPE in a single \
|
||||
* statement: eg `TYPE a, b;', in case if TYPE is a pointer, \
|
||||
* expands to `type* a, b;' wich isn't what we want. \
|
||||
* expands to `type* a, b;' which isn't what we want. \
|
||||
*/ \
|
||||
\
|
||||
if (_elems > _QSORT_MAX_THRESH) { \
|
||||
|
@ -148,7 +148,7 @@ def get_macos_shortcut_for(
|
||||
) -> Optional[SingleKey]:
|
||||
# for maximum robustness we should use opts.alias_map to resolve
|
||||
# aliases however this requires parsing everything on startup which could
|
||||
# be potentially slow. Lets just hope the user doesnt alias these
|
||||
# be potentially slow. Lets just hope the user doesn't alias these
|
||||
# functions.
|
||||
ans = None
|
||||
candidates = []
|
||||
@ -194,7 +194,7 @@ def set_macos_app_custom_icon() -> None:
|
||||
log_error('Failed to set custom app icon, ignoring')
|
||||
# macOS Dock does not reload icons until it is restarted, so we set
|
||||
# the application icon here. This will revert when kitty quits, but
|
||||
# cant be helped since there appears to be no way to get the dock
|
||||
# can't be helped since there appears to be no way to get the dock
|
||||
# to reload short of killing it.
|
||||
cocoa_set_dock_icon(icon_path)
|
||||
break
|
||||
|
@ -885,7 +885,7 @@ scroll_event(double xoffset, double yoffset, int flags, int modifiers) {
|
||||
}
|
||||
if (!w) return;
|
||||
// Also update mouse cursor position while kitty OS window is not focused.
|
||||
// Allows scroll events to be delivered to the child with correct pointer co-ordinates even when
|
||||
// Allows scroll events to be delivered to the child with correct pointer coordinates even when
|
||||
// the window is not focused on macOS
|
||||
if (!osw->is_focused) {
|
||||
unsigned int x = 0, y = 0;
|
||||
|
@ -387,7 +387,7 @@ Separate scrollback history size (in MB), used only for browsing the scrollback
|
||||
buffer with pager. This separate buffer is not available for interactive
|
||||
scrolling but will be piped to the pager program when viewing scrollback buffer
|
||||
in a separate window. The current implementation stores the data in UTF-8, so
|
||||
approximatively 10000 lines per megabyte at 100 chars per line, for pure ASCII,
|
||||
approximately 10000 lines per megabyte at 100 chars per line, for pure ASCII,
|
||||
unformatted text. A value of zero or less disables this feature. The maximum
|
||||
allowed size is 4GB. Note that on config reload if this is changed it will only
|
||||
affect newly created windows, not existing ones.
|
||||
@ -1253,7 +1253,7 @@ use :code:`{sup.index}`. All data available is:
|
||||
:code:`title`
|
||||
The current tab title.
|
||||
:code:`index`
|
||||
The tab index useable with :ac:`goto_tab N <goto_tab>` shortcuts.
|
||||
The tab index usable with :ac:`goto_tab N <goto_tab>` shortcuts.
|
||||
:code:`layout_name`
|
||||
The current layout name.
|
||||
:code:`num_windows`
|
||||
|
@ -153,7 +153,7 @@ def is_cmd_allowed(pcmd: Dict[str, Any], window: Optional['Window'], from_socket
|
||||
return True
|
||||
if 'cancel_async' in pcmd and pcmd.get('async_id'):
|
||||
# we allow these without authentication as they are sent on error
|
||||
# conditions and we cant have users prompted for these. The worst side
|
||||
# conditions and we can't have users prompted for these. The worst side
|
||||
# effect of a malicious cancel_async request is that it can prevent
|
||||
# another async request from getting a result, if it knows the async_id
|
||||
# of that request.
|
||||
|
@ -937,7 +937,7 @@ draw_cells(ssize_t vao_idx, ssize_t gvao_idx, const ScreenRenderData *srd, float
|
||||
CellRenderData crd = {.gl={.xstart = srd->xstart, .ystart = srd->ystart, .dx = srd->dx * x_ratio, .dy = srd->dy * y_ratio} };
|
||||
crd.gl.width = crd.gl.dx * screen->columns; crd.gl.height = crd.gl.dy * screen->lines;
|
||||
// The scissor limits below are calculated to ensure that they do not
|
||||
// overlap with the pixels outside the draw area. We cant use the actual pixel window dimensions
|
||||
// overlap with the pixels outside the draw area. We can't use the actual pixel window dimensions
|
||||
// because of the mapping of opengl's float based co-ord system to pixels.
|
||||
// for a test case (scissor is also used to blit framebuffer in draw_cells_interleaved_premult) run:
|
||||
// kitty -o background=cyan -o background_opacity=0.7 -o cursor_blink_interval=0 -o window_margin_width=40 -o remember_initial_window_size=n -o initial_window_width=401 kitty +kitten icat --hold logo/kitty.png
|
||||
|
@ -30,7 +30,7 @@ from typing import (
|
||||
def contents(package: str) -> Iterator[str]:
|
||||
try:
|
||||
if sys.version_info[:2] < (3, 10):
|
||||
raise ImportError('importlib.resources.files() doesnt work with frozen builds on python 3.9')
|
||||
raise ImportError("importlib.resources.files() doesn't work with frozen builds on python 3.9")
|
||||
from importlib.resources import files
|
||||
except ImportError:
|
||||
from importlib.resources import contents
|
||||
|
@ -109,7 +109,7 @@ copy --exclude **/w.* --exclude **/r d1
|
||||
contents = set(files_in(remote_home))
|
||||
contents.discard('.zshrc') # added by check_bootstrap()
|
||||
# depending on platform one of these is a symlink and hence
|
||||
# isnt in contents
|
||||
# isn't in contents
|
||||
contents.discard(f'{tname}/x/xterm-kitty')
|
||||
contents.discard(f'{tname}/78/xterm-kitty')
|
||||
self.ae(contents, {
|
||||
|
@ -95,7 +95,7 @@ read_base64_from_tty() {
|
||||
untar_and_read_env() {
|
||||
# extract the tar file atomically, in the sense that any file from the
|
||||
# tarfile is only put into place after it has been fully written to disk
|
||||
command -v tar > /dev/null 2> /dev/null || die "tar is not availiable on this server. The ssh kitten requires tar."
|
||||
command -v tar > /dev/null 2> /dev/null || die "tar is not available on this server. The ssh kitten requires tar."
|
||||
tdir=$(command mktemp -d "$HOME/.kitty-ssh-kitten-untar-XXXXXXXXXXXX")
|
||||
[ $? = 0 ] || die "Creating temp directory failed"
|
||||
# suppress STDERR for tar as tar prints various warnings if for instance, timestamps are in the future
|
||||
|
@ -78,7 +78,7 @@ var SetBlockingRead TermiosOperation = SetReadTimeout(0)
|
||||
|
||||
var SetRaw TermiosOperation = func(t *unix.Termios) {
|
||||
// This attempts to replicate the behaviour documented for cfmakeraw in
|
||||
// the termios(3) manpage, as Go doesnt wrap cfmakeraw probably because its not in POSIX
|
||||
// the termios(3) manpage, as Go doesn't wrap cfmakeraw probably because its not in POSIX
|
||||
t.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON
|
||||
t.Oflag &^= unix.OPOST
|
||||
t.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN
|
||||
@ -336,7 +336,7 @@ func (self *Term) GetSize() (*unix.Winsize, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// go doesnt have a wrapper for ctermid()
|
||||
// go doesn't have a wrapper for ctermid()
|
||||
func Ctermid() string { return "/dev/tty" }
|
||||
|
||||
func DebugPrintln(a ...any) {
|
||||
|
Loading…
Reference in New Issue
Block a user