-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql shell: confused cursor positioning when editing a long input that spans multiple terminal lines #71209
Comments
I did some debugging of this today because it still frustrates me. Seems like libedit is just doing something strange. Just before the corruption occurs the line looks like:
Notice that the first line is exactly 120 characters wide which is exactly the terminal width. I then type an
I'm not sure what is going on with my terminal or terminfo which is causing this badness. Libedit seems to think that inserting characters at the end of a line won't cause the cursor to move to the next line. It also isn't clear to me why it is trying to insert characters at the end of the line. I've poked around in the libedit sources to try and understand what is going on. If you want to be scared of some code, take a look at the code in |
Disabling Recording this for posterity:
|
86457: cli: replace libedit with bubbline r=ZhouXing19 a=knz First commit from #88574. Benefits from (but is not dependent on) #87606 server-side. Fixes #21826 Fixes #71207 Fixes #71209 Fixes #57885 NB: this will benefit from upstream library releases based off the still-unmerged PRs listed in knz/bubbline#2. Release justification: n/a will not merge before stability ends Release note (cli change): The engine used as line editor in the interactive shell (`cockroach sql`, `demo`) has been updated. It includes numerous bug fixes and new features. The previous engine can still be accessed via the env var COCKROACH_SQL_FORCE_LIBEDIT. This support will be removed in a later version. 92335: kvserver,logstore: introduce log StateLoader r=tbg a=pavelkalinnikov Previously the `StateLoader` accessed both log and state machine state. This commit moves most of the log-specific accesstors to the `logstore` package. Part of #91979 Release note: None Co-authored-by: Raphael 'kena' Poss <[email protected]> Co-authored-by: Pavel Kalinnikov <[email protected]>
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
orTERM=xterm-256color
using macOS terminal or iterm:Expected behavior
positioning is correct.
Additional data / screenshots
st
.TERM
tovt100
tmux
mosh
Environment:
crdb 21.2
Jira issue: CRDB-10442
Epic CRDB-22182
The text was updated successfully, but these errors were encountered: