Skip to content
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

prompt: fix some keybindings to work with multilines #9

Merged
merged 6 commits into from
Jul 19, 2023

Conversation

askalt
Copy link

@askalt askalt commented Jul 18, 2023

  • The behavior of the Home/End has been changed:
    now, the cursor moves to the beginning/end of the entire command
    (instead of the line) when these keys are pressed.

  • The behavior of the alt-b/alt-f has been changed:
    now, the cursor moves one word backward in multiline commands, and
    the word delimeter characters are \n and .

  • The associated emacs keybindings have been changed:
    now ctrl-b/ctrl-f allow to move over the entire multiline command.
    ctrl-a/ctrl-e same as Home/End.

  • Added integration tests for emacs keyset.

Closes #6

@askalt askalt force-pushed the askalt/gh-6-fix-keys branch 2 times, most recently from 71d32d2 to 5d81f2b Compare July 18, 2023 14:41
@askalt
Copy link
Author

askalt commented Jul 18, 2023

Also, the module was renamed to github.com/tarantool/go-prompt.

@askalt askalt force-pushed the askalt/gh-6-fix-keys branch 2 times, most recently from 7e7a392 to f600ea7 Compare July 19, 2023 05:26
@askalt askalt requested a review from psergee July 19, 2023 07:08
- The behavior of the `Home`/`End` has been changed:
now, the cursor moves to the beginning/end of the entire command
(instead of the line) when these keys are pressed.

- The behavior of the `alt-b`/`alt-f` has been changed:
now, the cursor moves one word backward in multiline commands, and
the word delimeter characters are `\n` and ` `.

- The associated emacs keybindings have been changed:
now `ctrl-b`/`ctrl-f` allow to move over the entire multiline command.
`ctrl-a`/`ctrl-e` same as `Home`/`End`.

- Added integration tests for emacs keyset.

Closes #6
@askalt askalt merged commit e046917 into main Jul 19, 2023
4 checks passed
@askalt askalt deleted the askalt/gh-6-fix-keys branch July 19, 2023 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

keybinds: need to fix multi-line behavior
2 participants