Skip to content

sql shell: confused cursor positioning when editing a long input that spans multiple terminal lines #71209

@knz

Description

@knz

reported by @petermattis

Describe the problem

When interactively editing a sql query that spans multiple terminal lines, the cursor positioning gets confused.

To Reproduce

TERM=xterm or TERM=xterm-256color using macOS terminal or iterm:

Kapture 2021-10-06 at 09 31 42

Expected behavior

positioning is correct.

Additional data / screenshots

  • the problem does not occur when using a linux terminal e.g. st.
  • the problem does not occur on macOS when setting TERM to vt100
  • the problem still occurs when logging in from the macOS terminal into a remote linux system
  • the problem still occurs when running through tmux
  • the problem still occurs when running through mosh

Environment:

crdb 21.2

Jira issue: CRDB-10442

Epic CRDB-22182

Metadata

Metadata

Assignees

Labels

A-cli-clientCLI commands that pertain to using SQL featuresB-os-macosIssues specific to macOS.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions