diff --git a/kitty/screen.c b/kitty/screen.c index 4c94830f2..612ad277e 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -1808,7 +1808,7 @@ screen_fake_move_cursor_to_position(Screen *self, index_type start_x, index_type if (count) { char output[KEY_BUFFER_SIZE+1] = {0}; if (self->prompt_settings.uses_special_keys_for_cursor_movement) { - const char *k = key == GLFW_FKEY_RIGHT ? "0" : "0;1"; + const char *k = key == GLFW_FKEY_RIGHT ? "1" : "1;1"; int num = snprintf(output, KEY_BUFFER_SIZE, "\x1b[%su", k); for (unsigned i = 0; i < count; i++) write_to_child(self, output, num); } else { diff --git a/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish b/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish index 160170cb7..a074d2639 100644 --- a/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish +++ b/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish @@ -99,8 +99,8 @@ function __ksi_schedule --on-event fish_prompt -d "Setup kitty integration after set suffix '-passive' end for mode in (bind --list-modes | string match -v paste) # bind in all modes except paste - bind --preset -M "$mode" \e\[0u "forward-char$suffix" - bind --preset -M "$mode" \e\[0\;1u "backward-char$suffix" + bind --preset -M "$mode" \e\[1u "forward-char$suffix" + bind --preset -M "$mode" \e\[1\;1u "backward-char$suffix" end end