From 563e28ef57534acb27d15a111e49a740d06817df Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Mon, 29 Jun 2020 10:41:51 -0700 Subject: [PATCH] Change cursor movement functions to string repeat --- README.md | 2 +- conf.d/_tide_cursor_movement.fish | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c68bf49..b9e7780 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Tide is a [Fish][] theme that provides a powerful, flexible, and out-of-the-box 2. Source and run the install function: ```fish - curl -sL git.io/tide | source; and tide_install + curl -sL git.io/tide | source && tide_install ``` ### System Requirements diff --git a/conf.d/_tide_cursor_movement.fish b/conf.d/_tide_cursor_movement.fish index e56295f..50e73ac 100644 --- a/conf.d/_tide_cursor_movement.fish +++ b/conf.d/_tide_cursor_movement.fish @@ -1,11 +1,7 @@ function _cursor_up -a number - if test $number -gt 0 - printf '%b' '\033['"$number"'A' - end + string repeat --count $number --no-newline \e\[1A end function _cursor_right -a number - if test $number -gt 0 - printf '%b' '\033['"$number"'C' - end + string repeat --count $number --no-newline \e\[1C end \ No newline at end of file