Skip to content

do not trim whitespace for tab completion#5477

Merged
vadi2 merged 2 commits intoMudlet:developmentfrom
atari2600tim:tim-autocompleteLeadingSpaces
Oct 8, 2021
Merged

do not trim whitespace for tab completion#5477
vadi2 merged 2 commits intoMudlet:developmentfrom
atari2600tim:tim-autocompleteLeadingSpaces

Conversation

@atari2600tim
Copy link
Copy Markdown
Contributor

Brief overview of PR changes/additions

Tab key to autocomplete was removing leading spaces. Some people use a leading space to bypass aliases and would prefer to preserve it when using autocomplete.
Remove trimmed() from one spot in the tab completion. The list of proposed words I think will not have spaces at the end, so trimming the result only really touches the front.

Motivation for adding to Mudlet

Trimming front is not a necessary or expected part of autocompletion.

Other info (issues closed, discussion etc)

Closes #579

Release post highlight

Leading whitespace no longer stripped by tab autocomplete.

Remove trimmed() from one spot in the tab completion code.  Look closer at it later and see if there is a reason it was there.  Trimmed does front and back, but back comes from the autocomplete dictionary thing so I -think- this is only consequence, unless the suggestion thing includes spaces at the end or something odd like that.  Issue 579.
@atari2600tim atari2600tim requested a review from a team as a code owner October 2, 2021 17:39
@atari2600tim atari2600tim requested a review from a team October 2, 2021 17:39
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Oct 2, 2021

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 2, 2021

clang-tidy review says "All clean, LGTM! 👍"

@vadi2 vadi2 self-assigned this Oct 8, 2021
Copy link
Copy Markdown
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

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

Looks good, though I suspect it might have some side effects. Let's test it.

@vadi2 vadi2 enabled auto-merge (squash) October 8, 2021 04:55
@vadi2 vadi2 merged commit 71d8a03 into Mudlet:development Oct 8, 2021
@atari2600tim atari2600tim deleted the tim-autocompleteLeadingSpaces branch October 8, 2021 05:32
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.

Tab completion wipes leading spaces

2 participants