Skip to content

Show autosuggestions when (left prompt + command) exceed right prompt#7035

Merged
faho merged 2 commits into
fish-shell:masterfrom
ksralgp:ksralgp_6948
May 24, 2020
Merged

Show autosuggestions when (left prompt + command) exceed right prompt#7035
faho merged 2 commits into
fish-shell:masterfrom
ksralgp:ksralgp_6948

Conversation

@ksralgp
Copy link
Copy Markdown
Contributor

@ksralgp ksralgp commented May 24, 2020

Description

Currently when the (left prompt + command) exceeds the right prompt autosuggestions are not shown. With this change autosuggestions are shown. Existing tests look green:

https://travis-ci.org/github/ksralgp/fish-shell/builds/690675896

Fixes issue #6948

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.md

Comment thread src/screen.cpp Outdated

// Case 3
if (!done) {
calculated_width = left_prompt_width + first_command_line_width + autosuggest_total_width;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation here is off, we use 4 space indents, not tabs.

See also build_tools/style.fish

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed whitespace in 812095b

@faho faho added the bug Something that's not working as intended label May 24, 2020
@faho faho added this to the fish 3.2.0 milestone May 24, 2020
@faho faho merged commit f55f98b into fish-shell:master May 24, 2020
@faho
Copy link
Copy Markdown
Member

faho commented May 24, 2020

Yeah, that works nicely. Thanks, merged!

@faho faho linked an issue May 24, 2020 that may be closed by this pull request
@ksralgp ksralgp deleted the ksralgp_6948 branch May 25, 2020 23:03
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something that's not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autosuggestions do not appear when cursor passes the fish_right_prompt

2 participants