core: fast path out of click to move if no semantic prompts

This commit is contained in:
Mitchell Hashimoto
2023-12-20 21:40:02 -08:00
parent 82e5080cd6
commit 3f9c42fd67

View File

@ -2097,6 +2097,11 @@ fn clickMoveCursor(self: *Surface, to: terminal.point.ScreenPoint) !void {
// support this feature. It is just too messy.
if (t.active_screen != .primary) return;
// This flag is only set if we've seen at least one semantic prompt
// OSC sequence. If we've never seen that sequence, we can't possibly
// move the cursor so we can fast path out of here.
if (!t.flags.shell_redraws_prompt) return;
// Get our path
const from = (terminal.point.Viewport{
.x = t.screen.cursor.x,