summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMitchell Hashimoto <m@mitchellh.com>2025-07-06 19:46:10 -0700
committerGitHub <noreply@github.com>2025-07-06 19:46:10 -0700
commitdb45fab85ee2a3038ced3e2fa3def83e22234620 (patch)
tree3d96adae65d5d83d42e5cae059ed182165cecae9 /include
parentfbb19949343a7fdaad939c366a26b421e5c102a2 (diff)
parent65a7c81c94432a94eb5ccb8ca8d835c3f083290b (diff)
bash: conditionally add cursor shape sequences (#7839)
In #7808, we stopped using PS0 to reset the cursor shape because restoring PS0 in __ghostty_preexec was causing issues (#7802). The alternate approach of printing the cursor reset escape sequence directly from __ghostty_preexec caused a new issue: the input cursor would persist longer than intended, such as when a suspended vim process was restored to the foreground. This change takes a different approach. We now conditionally add the cursor shape escape sequences to PS0 (and PS1, for consistency) when they don't already appear. The fixes the cursor shape reset problem. The main downside to this approach is that PS0 will continue to contain this escape sequence; it won't be cleared/reset in __ghostty_preexec for the reasons described in #7808. This feels like an acceptable outcome because there's no harm in the modified PS0 existing for the life of the bash session (rather than it being modified and then restored for each command cycle), and it's consistent with how some other terminals' bash integration works (e.g. kitty).
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions