diff --git a/docs/changelog.rst b/docs/changelog.rst index 3f983fee0..1dd6bdd47 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -359,7 +359,7 @@ Changelog - When triple-clicking select all wrapped lines belonging to a single logical line. -- hints kitten: Detect bracketed URLs and dont include the closing bracket in the URL. +- hints kitten: Detect bracketed URLs and don't include the closing bracket in the URL. - When calling pass_selection_to_program use the current directory of the child process as the cwd of the program. diff --git a/docs/kittens/unicode-input.rst b/docs/kittens/unicode-input.rst index 1b1636124..88c746d29 100644 --- a/docs/kittens/unicode-input.rst +++ b/docs/kittens/unicode-input.rst @@ -18,5 +18,5 @@ typing a leading period and then the two character index and pressing Enter. In :guilabel:`Name` mode you instead type words from the character name and use the arrow keys/tab to select the character from the displayed matches. You can also type -a leading period and the index for the match if you dont like to use arrow +a leading period and the index for the match if you don't like to use arrow keys. diff --git a/docs/remote-control.rst b/docs/remote-control.rst index d640c2072..333dafabe 100644 --- a/docs/remote-control.rst +++ b/docs/remote-control.rst @@ -116,7 +116,7 @@ shell with completion for |kitty| command names and options. You can even open the |kitty| shell inside a running |kitty| using a simple keyboard shortcut (:sc:`kitty_shell` by default). This has the added -advantage that you dont need to use ``allow_remote_control`` to make it work. +advantage that you don't need to use ``allow_remote_control`` to make it work. Allowing only some windows to control kitty diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 1466145a9..4075fa5a8 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -845,7 +845,7 @@ is_ascii_control_char(char x) { debug_key(@"scancode: 0x%x (%s) %stext: %s glfw_key: %s\n", scancode, safe_name_for_scancode(scancode), format_mods(mods), format_text(_glfw.ns.text), _glfwGetKeyName(key)); - if (is_ascii_control_char(_glfw.ns.text[0])) _glfw.ns.text[0] = 0; // dont send text for ascii control codes + if (is_ascii_control_char(_glfw.ns.text[0])) _glfw.ns.text[0] = 0; // don't send text for ascii control codes _glfwInputKeyboard(window, key, scancode, GLFW_PRESS, mods, _glfw.ns.text, 0); } diff --git a/glfw/xkb_glfw.c b/glfw/xkb_glfw.c index 8623d2202..22a532102 100644 --- a/glfw/xkb_glfw.c +++ b/glfw/xkb_glfw.c @@ -484,7 +484,7 @@ glfw_xkb_handle_key_event(_GLFWwindow *window, _GLFWXKBData *xkb, xkb_keycode_t if ( ((GLFW_MOD_CONTROL | GLFW_MOD_ALT | GLFW_MOD_SUPER) & sg->modifiers) == 0) xkb_state_key_get_utf8(sg->state, code_for_sym, key_event.text, sizeof(key_event.text)); text_type = "text"; } - if ((1 <= key_event.text[0] && key_event.text[0] <= 31) || key_event.text[0] == 127) key_event.text[0] = 0; // dont send text for ascii control codes + if ((1 <= key_event.text[0] && key_event.text[0] <= 31) || key_event.text[0] == 127) key_event.text[0] = 0; // don't send text for ascii control codes if (key_event.text[0]) { debug("%s: %s ", text_type, key_event.text); } } int glfw_keycode = glfw_key_for_sym(glfw_sym); diff --git a/kitty/cmds.py b/kitty/cmds.py index 9190f4064..2e63cd4d5 100644 --- a/kitty/cmds.py +++ b/kitty/cmds.py @@ -421,7 +421,7 @@ When using --new-tab set the title of the tab. --no-response type=bool-set default=false -Dont wait for a response giving the id of the newly opened window. Note that +Don't wait for a response giving the id of the newly opened window. Note that using this option means that you will not be notified of failures and that the id of the new window will not be printed out. ''', @@ -482,7 +482,7 @@ def new_window(boss, window, payload): --no-response type=bool-set default=false -Dont wait for a response from kitty. This means that even if no matching window is found, +Don't wait for a response from kitty. This means that even if no matching window is found, the command will exit with a success code. ''' ) diff --git a/kitty/freetype.c b/kitty/freetype.c index 2f3b728d9..8d12711fc 100644 --- a/kitty/freetype.c +++ b/kitty/freetype.c @@ -336,7 +336,7 @@ render_bitmap(Face *self, int glyph_id, ProcessedBitmap *ans, unsigned int cell_ static void downsample_bitmap(ProcessedBitmap *bm, unsigned int width, unsigned int cell_height) { // Downsample using a simple area averaging algorithm. Could probably do - // better with bi-cubic or lanczos, but at these small sizes I dont think + // better with bi-cubic or lanczos, but at these small sizes I don't think // it matters float ratio = MAX((float)bm->width / width, (float)bm->rows / cell_height); int factor = ceilf(ratio); diff --git a/kitty/glfw.c b/kitty/glfw.c index 8fc336621..c7ed4697c 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -395,7 +395,7 @@ create_os_window(PyObject UNUSED *self, PyObject *args) { glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, OPENGL_REQUIRED_VERSION_MINOR); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, true); - // We dont use depth and stencil buffers + // We don't use depth and stencil buffers glfwWindowHint(GLFW_DEPTH_BITS, 0); glfwWindowHint(GLFW_STENCIL_BITS, 0); #ifdef __APPLE__ @@ -482,7 +482,7 @@ create_os_window(PyObject UNUSED *self, PyObject *args) { w->handle = glfw_window; update_os_window_references(); for (size_t i = 0; i < global_state.num_os_windows; i++) { - // On some platforms (macOS) newly created windows dont get the initial focus in event + // On some platforms (macOS) newly created windows don't get the initial focus in event OSWindow *q = global_state.os_windows + i; q->is_focused = q == w ? true : false; } diff --git a/kitty/line.c b/kitty/line.c index 91244acdd..509714202 100644 --- a/kitty/line.c +++ b/kitty/line.c @@ -306,7 +306,7 @@ line_add_combining_char(Line *self, uint32_t ch, unsigned int x) { CPUCell *cell = self->cpu_cells + x; if (!cell->ch) { if (x > 0 && (self->gpu_cells[x-1].attrs & WIDTH_MASK) == 2 && self->cpu_cells[x-1].ch) cell = self->cpu_cells + x - 1; - else return; // dont allow adding combining chars to a null cell + else return; // don't allow adding combining chars to a null cell } for (unsigned i = 0; i < arraysz(cell->cc_idx); i++) { if (!cell->cc_idx[i]) { cell->cc_idx[i] = mark_for_codepoint(ch); return; } diff --git a/kitty/remote_control.py b/kitty/remote_control.py index b653004cf..051f2e579 100644 --- a/kitty/remote_control.py +++ b/kitty/remote_control.py @@ -30,7 +30,7 @@ def handle_cmd(boss, window, cmd): try: ans = func() if payload is None else func(payload) except Exception: - if no_response: # dont report errors if --no-response was used + if no_response: # don't report errors if --no-response was used return raise response = {'ok': True} diff --git a/kitty/screen.c b/kitty/screen.c index 76ad395d9..d9df21e95 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -1242,7 +1242,7 @@ screen_report_size(Screen *self, unsigned int which) { void report_device_status(Screen *self, unsigned int which, bool private) { - // We dont implement the private device status codes, since I haven't come + // We don't implement the private device status codes, since I haven't come // across any programs that use them unsigned int x, y; static char buf[64]; diff --git a/kitty/shaders.c b/kitty/shaders.c index fe6ce1f47..5c630aed3 100644 --- a/kitty/shaders.c +++ b/kitty/shaders.c @@ -113,7 +113,7 @@ static inline void ensure_sprite_map(FONTS_DATA_HANDLE fg) { SpriteMap *sprite_map = (SpriteMap*)fg->sprite_map; if (!sprite_map->texture_id) realloc_sprite_texture(fg); - // We have to rebind since we dont know if the texture was ever bound + // We have to rebind since we don't know if the texture was ever bound // in the context of the current OSWindow glActiveTexture(GL_TEXTURE0 + SPRITE_MAP_UNIT); glBindTexture(GL_TEXTURE_2D_ARRAY, sprite_map->texture_id); diff --git a/kitty/terminfo.py b/kitty/terminfo.py index 82d2312b9..aec80ede5 100644 --- a/kitty/terminfo.py +++ b/kitty/terminfo.py @@ -38,7 +38,7 @@ bool_capabilities = { # https://github.com/kovidgoyal/kitty/blob/master/protocol-extensions.asciidoc 'Su', - # The following are entries that we dont use + # The following are entries that we don't use # # background color erase # 'bce', } @@ -283,7 +283,7 @@ string_capabilities = { # Set RGB background color (non-standard used by neovim) 'setrgbb': r'\E[48:2:%p1%d:%p2%d:%p3%dm', - # The following are entries that we dont use + # The following are entries that we don't use # # display status line # 'dsl': r'\E]2;\007', # # return from status line diff --git a/kitty/utils.py b/kitty/utils.py index e559f586e..817946b8a 100644 --- a/kitty/utils.py +++ b/kitty/utils.py @@ -191,7 +191,7 @@ def adjust_line_height(cell_height, val): def init_startup_notification_x11(window_handle, startup_id=None): # https://specifications.freedesktop.org/startup-notification-spec/startup-notification-latest.txt from kitty.fast_data_types import init_x11_startup_notification - sid = startup_id or os.environ.pop('DESKTOP_STARTUP_ID', None) # ensure child processes dont get this env var + sid = startup_id or os.environ.pop('DESKTOP_STARTUP_ID', None) # ensure child processes don't get this env var if not sid: return from .fast_data_types import x11_display diff --git a/setup.py b/setup.py index ffdb6a7c3..820fdc560 100755 --- a/setup.py +++ b/setup.py @@ -394,8 +394,8 @@ def compile_c_extension(kenv, module, incremental, compilation_database, all_key parallel_run(todo) dest = os.path.join(base, module + '.so') if not incremental or newer(dest, *objects): - # Old versions of clang dont like -pthread being passed to the linker - # Dont treat linker warnings as errors (linker generates spurious + # Old versions of clang don't like -pthread being passed to the linker + # Don't treat linker warnings as errors (linker generates spurious # warnings on some old systems) unsafe = {'-pthread', '-Werror', '-pedantic-errors'} linker_cflags = list(filter(lambda x: x not in unsafe, kenv.cflags))